| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
| |
Nightly rustdoc now warns if you have a link that isn't necessary,
and if you have a link that might refer to two different things.
|
| | |
|
| |\
| |
| |
| |
| | |
clippy: Allow some of our existing code patterns
See merge request tpo/core/arti!1396
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Fixes #920
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are a number of places where we generate random Durations
in a range which starts at zero.
These call sites currently (i) have to write out Duration::ZERO
or equivalent, and (ii) would have to use gen_range_checked and expect
the result, even though it can be statically proven to be OK.
To make this slightly smoother, provide `GenRangeInfallible` and
`gen_range_infallible`.
|
| | |
| |
| |
| |
| | |
delay_bounds's implementation ensures the postcondition, so the
potential p[anic in next_delay_msec cannot happen.
|
| |/
|
|
| |
We will use this in many places instead of gen_range.
|
| |
|
|
| |
Closes #950.
|
| | |
|
| |
|
|
| |
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
|
|
| |
closed bound.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
| |
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
| |
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
| |
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
|
|
|
|
| |
By implementing `RangeBounds` for `TimerangeBound`, we get
`RangeBoundsExt` for free. This will enable `parse_decrypt_validate` to
easily compute the intersection of the `TimerangeBound`s its layers.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
| |
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
| |
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
|
|
|
|
| |
We'll probably need the hsdir list to be shuffled deterministically for
testing purposes (this might be desirable, for example, when we write a
test for HS descriptor download retries).
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
| |
Corrects the doc and fixes a rustdoc warning.
|
| | |
|
| |
|
|
|
| |
This commit is mostly code movement; I'd recommend reviewing it
with git's `--color-moved` option.
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1056#note_2884428
|
| |
|
|
| |
We're going to want this for cheaply stripping ".onion" from things.
|
| |
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This is the hunks from running the rune in maint/adhoc-add-lint-blocks
but which require some subsequent manual fixup: usually, deleting
now-superfluous outer allows, but in some cases manually putting back
lints that the adhoc script deleted.
|
| |
|
|
|
| |
This will help avoid the programmer making the mistake I made here:
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/852#note_2854029
|
| |
|
|
|
| |
We do want to test this with a non-Option type, but we are going to
have to wrap it up.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This is currently nightly-only and is blocked on an unresolved API
question:
https://github.com/rust-lang/rust/issues/71503
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
The keys can change: if they do, then the entry is removed from its
previous position and inserted at the new one, possibly displacing
others.
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
This lint exists for perf reasons, and this is rarely relevant in
tests.
Using double quoted str is generally cognitively less burdensome.
|
| |
|
|
|
| |
For whatever reason, rustdoc didn't like these multiline strings
in `doc` attributes.
|
| |
|
|
| |
Otherwise, there is a parsing ambiguity. :(
|
| |
|
|
|
| |
Previously we used `<T>` in a bunch of places. But that fails
if you try to declare `T` as a parameter on the structure itself.
|
| |
|
|
| |
I am finding as I use this that I want a variant that can't panic.
|