| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
This commit is automatically generated.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
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`.
|
| |/
|
|
| |
We will use this in many places instead of gen_range.
|
| |
|
|
| |
Closes #950.
|
| | |
|
| |
|
|
| |
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 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 currently nightly-only and is blocked on an unresolved API
question:
https://github.com/rust-lang/rust/issues/71503
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
Every element in the set has up to N keys, each of which may have differnt
types. No value for any key may correspond to more than one element in
the set.
These properties can be provided, via a macro, for values of N between 1
and $BIG_ENOUGH.
We'll use this to implement a type that holds HasRelayIds.
|
| |
|
|
|
| |
We're going to want this functionality, which isn't in the stable
stdlib.
|
| | |
|
| |
|
|
|
|
|
| |
This is going to make it simpler to write the code in guardmgr (and
later in circmgr) that keeps track of how many relays were rejected
for what reason. The latter, in turn, should improve error messages
when we're unable to pick a guard or a path.
|
| |
|
|
| |
Update all lint blocks
|
| |\
| |
| |
| |
| | |
New facility for deterministic and reproducible test PRNGs.
See merge request tpo/core/arti!561
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The new `testing_rng()` function is meant as a replacement for
thread_rng() for use in unit tests. By default, it uses a randomly
seeded RNG, but prints the seed before the test so that you can
reproduce any failures that occur. You can override this via the
environment to use a previous seed, or by using a deterministic
seed for all your tests.
Backend for #486.
|
| | |
| |
| |
| |
| | |
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.
|
| |
|
|
| |
These are warnings that we've decided it's okay to suppress elsewhere.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a general-purpose implementation of the ad-hoc approach
currently taken in (eg) crates/tor-proto/src/channel/reactor.rs,
with an API intended to defned against the more obvious mistakes.
This allows us to separate the two concerns: the channel reactor can
focus on handling channel cells and control messages and is over 2.5x
shorter.
The complexity of the manual sink implementation, and the machinery
needed to avoid having to suspend while holding an item, are dealt
with separately. That separate implemenation now has proper
documentation. (Tests are in the nest commit to avoid this one being
even more unwieldy.)
We use `extend` to define this as an extension trait. A competitor is
`ext` but in my personal projects I have found `extend` slightly
better.
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/471#note_2798026
|
| | |
|
| | |
|
| |
|
|
|
| |
This (almost) a pure code-movement commit: it also makes one public
function private in order to suppress a warning.
|
| |
|
|
|
|
| |
We have upstreamed this code.
This reverts commit 6193c9d9742d1d19a45a0ee1c383858201304912.
|
| |
|
|
|
| |
This will be used to allow our config *builder* structs to be
Deserialize.
|
| |
|
|
|
|
|
|
|
|
| |
The doc include rune does not work with our MSRV; it needs 1.54.
The alternative would be some kind of cfg() but that would
- not provide the crate-level doc on Rust 1.53
- involve the use of cfg_attr
Instead, just do it the old way.
|
| |
|
|
| |
Now the diff from the merge base does not contain any hits for ^\+.*bytes
|
| |
|
|
|
|
|
| |
Code motion and the minimal mechanical changes.
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/375#note_2783078
|