| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
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 independent of other crates, since this one is lower-level
than the tor-* crates.
Note that we're using std::time::SystemTime except for its `now`
method; this will be our practice elsewhere too.
|
| |
|
|
|
|
| |
Spotted during review by gabi-250 in another test.
Signed-off-by: Tobias Stoeckmann <[email protected]>
|
| |
|
|
|
| |
With the newly introduced count function, extend_from_retry_error can be
simplified by spliting n_errors calculation from new_attempt creation.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The dedup_by function grows the "last_attempt" always by one, even if a
range is encountered. A mergeable range can be encountered if the
RetryError has been extended by another RetryError already containing a
range.
Take this special case into account by using the actual amount of
failures of the attempt when growing.
Signed-off-by: Tobias Stoeckmann <[email protected]>
|
| |
|
|
| |
The function argument is named same_err, not dedup.
|
| |\
| |
| |
| |
| |
| |
| | |
Use ErrorSources where appropriate to walk an error stack.
Closes #2338
See merge request tpo/core/arti!3685
|
| | | |
|
| |/
|
|
|
|
|
|
|
| |
`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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
rend_handshake time
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This reverts commit e0efb477df868baf09d37de99e8e346136e66140.
There wasn't a consensus on this change, so sticking with the status
quo.
|
| | |
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
| |
This feature has been removed from nightly, in favor of doc_cfg.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Run cargo fix --edition
2. Selectively revert the "if let"->"match" changes.
These changes are meant to protect us from the lifetime changes
for "if let" bindings in Rust 2024.
But we're not actually relying on the old lifetime rules
anywhere, and the match syntax here is quite ugly.
3. Automatically revert `$pat:expr_2021` to `$pat:expr`.
(We don't actually want to restrict the expression syntax
that our macros accept).
Done with
`git grep -l expr_2021 | xargs perl -i -pe 's/expr_2021/expr/g;'`
4. Run cargo fmt.
|
| |
|
|
| |
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.
|
| |
|
|
| |
This commit is automatically generated.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
The effect is that everywhere a RetryError is used, the error sources
for the contained errors will be Display'd.
In tor-hsclient we no longer need to explicitly wrap things up in
tor_error::Report.
|
| |
|
|
|
| |
We're going to require that a RetryError contains things that are
AsRef<dyn Error> and ParseIntError isn't so we need a newtype.
|
| |
|
|
|
| |
This code came from tor-error. So now tor-error depends on
retry-error.
|
| | |
|
| |
|
|
| |
Closes #950.
|
| | |
|
| |
|
|
|
| |
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.
|
| |
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| | |
|
| |
|
|
|
|
|
| |
Apparently cargo fmt doesn't like these, which my perl rune didn't
delete.
This commit is precisely the result of `cargo fmt`.
|
| |
|
|
|
|
|
|
| |
The feature we want is `#[doc = include_str!("README.md")]`, which is
stable since 1.54 and our MSRV is now 1.56.
This commit is precisely the result of the following Perl rune:
perl -i~ -0777 -pe 's{(^//!(?!.*\@\@).*\n)+}{#![doc = include_str!("../README.md")]\n}m' crates/*/src/lib.rs
|
| | |
|
| |
|
|
| |
Update all lint blocks
|
| | |
|
| |
|
|
|
| |
From running add_warning, with manual picking of the right
hunks/lines.
|
| |
|
|
|
|
| |
This was the result of:
maint/add_warning crates/*/src/{lib,main}.rs
and then manually curating the results.
|
| |
|
|
|
|
|
| |
The arti crate itself is only used in benchmark and testing crate.
I think this sentence does not belong here.
Also extend retry-error description (from Architecture.md).
|