| 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.
|
| |
|
|
|
|
| |
Also set a better error message when validating channel target.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
| |
ChanTarget
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
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 makes the `HasAddrs` trait nicer to use when most things that have
addresses are passed by reference anyways.
|
| | |
|
| | |
|
| |
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
| |
Worsify formatting as demanded by rustfmt.
|
| |
|
|
|
| |
This seems logically necessary, and I want to use it in intro point
selection.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
If we didn't do this, we would need to transfrom
`EncodedLinkSpec`s into a `LinkSpec::Unrecognized`, which is not
semantically right. What's more, every user of this API wants to
consume encoded link specifiers, so encoding them early saves a
little effort.
|
| |
|
|
| |
This is pure code movement.
|
| |
|
|
|
|
| |
This change is necessary so that we can build Extend2 messages
that have their LinkSpecs appear in a verbatim order as provided
in an INTRODUCE2 message or in a HS descriptor.
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |\
| |
| |
| |
| | |
tor-linkspec: Fix an unused lint
See merge request tpo/core/arti!935
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Otherwise:
cargo +stable clippy -p tor-proto --all-features --all-targets
Produces:
warning: unused import: `PtTargetAddr`
--> crates/tor-linkspec/src/traits.rs:9:28
|
9 | use crate::{ChannelMethod, PtTargetAddr, RelayIdRef, RelayIdType, RelayIdTypeIter};
| ^^^^^^^^^^^^
|
| |/
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| |
|
|
|
|
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/issues/668#note_2858220
This commit is difficult to split up.
The innards of BridgeAddr and PtTargetAddr are still a bit entangled.
|
| |\
| |
| |
| |
| | |
Add tests for a bunch of code in tor-linkspec
See merge request tpo/core/arti!867
|
| | | |
|
| | | |
|
| |/ |
|
| |
|
|
|
|
|
|
|
|
|
| |
Fixes
cargo +stable clippy --manifest-path=/home/ian/Rustup/Arti/arti/Cargo.toml --locked --target-dir=target --offline -p tor-linkspec --no-default-features --all-targets
giving
446 | .method(ChannelMethod::Pluggable(PtTarget::new(
| ^^^^^^^^^ variant or associated item not found in `transport::ChannelMethod`
|
| |
|
|
| |
I'm not sure why the CI didn't reject this the first time around.
|
| |\
| |
| |
| |
| | |
CircMgr: Refactor DirSpecificTarget constructor
See merge request tpo/core/arti!866
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit replaces the
`impl From<&T> for OwnedChanTarget where T:ChanTarget`
with a new `IntoOwnedChanTarget` trait. This lets us be explicit
that we're constructing an owned object, and not just converting
something.
No semver change needed, since these APIs haven't been released.
----------- (new description)
|
| |/
|
|
|
|
|
|
|
|
| |
This change lets us display a ChanTarget's members without first
cloning them into an OwnedChanTarget.
It also resolves a reliability issue by outputting better info when
talking about connections via pluggable transports.
Closes #647
|
| | |
|
| |
|
|
|
| |
This is not something we need to solve for 1.1.0 (and it might not
need to be solved ever).
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
Use BridgeConfig to identify bridges in two places
See merge request tpo/core/arti!781
|
| | |
| |
| |
| |
| |
| | |
This lets us write functions which can either take an existing
owned OwnedChanTarget, or copy out of some other kind of ChanTarget
passed by reference.
|
| |/
|
|
| |
Eg, a PT bridge may not have an address.
|
| |
|
|
|
|
| |
In addition to the usual "You named that method wrong!" errors, we
have a new rustdoc error that complains about bogus "HTML tags" that
are actually unquoted usage of types like `Result<Foo>`.
|
| |
|
|
|
| |
It looks like this got fixed, but my branch for !759 reintroduced it
by refactoring.
|
| |
|
|
|
|
|
| |
Now each `ChanTarget` has at most one `ChannelMethod`, and only
`Direct` `ChannelMethods` can have multiple addresses.
Closes #600.
|