| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| |
| |
| | |
Removed unnecessary lint
Closes #2556
See merge request tpo/core/arti!4210
|
| | | |
|
| | |
| |
| |
| | |
Removed unnecessary lint
|
| |/ |
|
| |
|
|
|
|
| |
(Several of our remaining string slicing instances are for
redaction, and it makes sense to have a single tested implementation
for this.)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.
I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.
This commit makes cargo clippy fail. We will add exceptions in the next
commit.
|
| |
|
|
|
| |
This is analogous to `Option::map()`, and can be useful when you need to
map the inner type of a `MaybeSensitive` to another type.
|
| |
|
|
|
|
| |
Rename them to respectively sensitive() and not_sensitive().
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
| |
This is meant to be like MaybeRedacted but for the Sensitive<>
container.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
`clippy::collapsible_if` started triggering after bumping the MSRV to
1.88.
Since this triggers from a lot of places, and since there even are a
couple of instances where we explicitly allow `clippy::collapsible_ifs`,
I've opened #2342 for deciding what to do about it.
|
| |
|
|
| |
This adds the lint to all our crates.
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
| |
This feature has been removed from nightly, in favor of doc_cfg.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, run
```
git grep -l "^edition =" |
xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```
Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.
Third, run cargo fmt again.
|
| |
|
|
| |
Closes #2012.
|
| |
|
|
|
|
|
| |
These APIs differ from Redactable by forcing the caller to choose
whether an object should be displayed in redacted or non-redacted
form. (Redactable objects still implement Display, which
creates the risk of accidentally displaying an un-redacted object.)
|
| |
|
|
| |
See #2060.
|
| |
|
|
|
|
| |
Denies 'mod.rs' files for consistency.
https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
|
| |
|
|
|
|
|
|
| |
In 1.83, this warning triggers on many of our crates.
We're thinking of fixing them all, but for now,
we're going to disable the warning.
This is part of #1765.
|
| |
|
|
|
| |
educe has bugs that mean it applies a Copy bound to its Clone impl.
Anyway, we just want to derive these normally, not do something weird.
|
| |
|
|
| |
This commit is automatically generated.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Closes #950.
|
| | |
|
| |
|
|
| |
Just like for Sensitive.
|
| |
|
|
| |
I think this is uncontroversial; we already have it for Sensitive.
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
|
|
|
|
| |
This warning kind of snuck up on us! (See #748) For now, let's
disable it. (I've cleaned it up in a couple of examples, since
those are meant to be more idiomatic and user-facing.)
Closes #748.
|
| |\
| |
| |
| |
| | |
Add test lint blocks to all "mod test"
See merge request tpo/core/arti!937
|
| | |
| |
| |
| |
| | |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| |/
|
|
|
|
|
|
|
|
| |
By analogy with similar methods on Mutex, Cell, BufReader, etc. etc.
Discussed here
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/890#note_2856885
Make it a method, as per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/928
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Closes #675.
|
| |
|
|
|
|
|
| |
Previously it was redacting exactly when safelogging was _disabled_,
which obviously isn't correct.
Fixes #671. Regression test included.
|
| | |
|
| | |
|
| |
|
|
|
| |
This is super helpful for cases where we want to write two nearly
identical implementations to format a type.
|
| | |
|
| |
|
|
|
|
| |
A "redactable" object is one that can be _partially_ scrubbed in
sensitive contexts. This can be very helpful for UX, but is not
risk-free: see comments.
|
| | |
|
| |
|
|
|
|
| |
We're going to have this same macro implement the same traits for a
second type. And its function is specific to `Sensitive`, so have it
know that.
|
| |
|
|
|
| |
We're about to use `.as_inner()` in a few places, and `.as_ref()` (by
analogy with `Option`) seems obviously necessary.
|
| | |
|
| |
|
|
|
|
|
| |
Apparently cargo fmt doesn't like these, which my perl rune didn't
delete.
This commit is precisely the result of `cargo fmt`.
|