| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Typos found with codespell
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This is used when we build an OwnedChanTarget using the builder. Instead
of going identities by identities at the callsite, we can use this
helper to get us a RelayIds builder and set it in the
OwnedChanTargetBuilder.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
| |
This required to implement Display for PtTarget.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
During the channel handshake, we require the peer IP address for the
canonicity check which requires the exact peer IP we are connected to.
This commit adds a function that enforces this requirement on a
ChannelMethod so anything else results in an error.
It is to basically have stronger guarantee on the channel method we use
in the handshake.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
This adds the lint to all our crates.
|
| | |
|
| |
|
|
| |
This silences a new warning on nightly.
|
| |
|
|
| |
Run maint/add_warning
|
| | |
|
| |
|
|
|
|
|
|
| |
This will let us model the actual structure of routerstatus entries in
netdocs more closely. They don't have the addresses in a single list.
When this code was written this would have been much more awkward,
but now we have RPITIT.
|
| |
|
|
| |
This feature has been removed from nightly, in favor of doc_cfg.
|
| |
|
|
|
|
|
|
|
|
| |
This is important, since some circuits require us to negotiate a new
channel, and some don't: by adding this variability, we can easily
learn a timeout based on pre-existing channels to our guards, but
then later time out if it takes a while to open a TLS connection.
This is a possible solution to part of #2079, a bug where we "learn"
a circuit timeout that is too low for us to satisfy.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
See #2060.
|
| |
|
|
|
|
| |
This method has always been deprecated, so it's not a big deal to
remove. It can be replaced with the corresponding iterators's `Default`
implementation.
|
| |
|
|
|
|
| |
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 warning shows up when running `cargo +nightly doc`.
Apparently nightly doesn't like it when we have elided a lifetime
that has a perfectly good name.
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
tor-chanmgr: support multiple channels for a relay ID
See merge request tpo/core/arti!2442
|
| | |
| |
| |
| | |
Like `ByRelayIds`, but allows multiple items per relay ID.
|
| | |
| |
| |
| |
| | |
This makes the `HasAddrs` trait nicer to use when most things that have
addresses are passed by reference anyways.
|
| |/
|
|
|
|
| |
The `derive_more` crate broke backward compatibility with this version,
so this change involved quite a few manual fixups.
With luck, they'll keep compatibility for some while in the future.
|
| | |
|
| |
|
|
| |
No semver implications since this wasn't in the last release.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We could call from_possibly_incomplete_slice in these, but that's
confusing and distracting.
Here we add this constructor, and document it (in terms of the
constructor to come), and change the call sites.
No functional change. Doing this now will prevent unwanted changes to
test behaviours when we change the behaviour of Readers made by
Reader::from_slice.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The codebase uses `r` sometimes and `b` at other times.
Making this consistent makes widespread changes easier, and is
clearer for humans.
I think `b` is better than `r` because `r` might be "return".
It is indeed used that way in a couple of places in reader.rs, even.
I haven't changed *everywhere*, just Readable impls (where `r` is
particularly likely to be "return value") and occurrences in
tor-bytes.
No functional change.
|
| |
|
|
|
|
|
|
| |
This is going to want to do something more complicated (as described
in the docs).
In this commit we change all the tests that are expecting Truncated
errors. That reduces noise in the next commit.
|
| |
|
|
|
|
|
| |
Error::Truncated is going to become more complicated, and anyway it
would be nice to print the values if the test fails.
Error is PartialEq now. (Maybe it wasn't when this was written?)
|
| |
|
|
| |
This commit is automatically generated.
|
| | |
|
| | |
|
| |
|
|
| |
This was an open-coded specialisation. Remove the one call site.
|
| | |
|
| |
|
|
|
| |
This will make it slightly easier to find these call sites if we want
to change them in the future.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Since Rust 1.66, std's default works properly for enums, provided that
the default variant is a unit.
Review all uses of `#[educe(default)]` on enums and replace them with
std where possible, which is most of them.
In 1.66 and later, std's `#[derive(Default)]` doesn't infer any
generic bounds on the derived impl, where it's an enum - since the
unit variant can always be constructed. So this change doesn't add
any generic bounds and is not API-visible.
|
| |
|
|
| |
Worsify formatting as demanded by rustfmt.
|
| |
|
|
|
| |
This seems logically necessary, and I want to use it in intro point
selection.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|