| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Explanation at
https://rust-lang.github.io/rust-clippy/master/index.html#/useless_vec
This is the non-tests subset of the same-named commmit in !1388,
(recreated by hand by me, and then checked against that commit;
I stole the commit message from Nick's.)
This should be uncontroversial I think.
|
| |\
| |
| |
| |
| |
| |
| | |
add_warning: Tolerate clippy::missing_panics_doc
Closes #950
See merge request tpo/core/arti!1380
|
| | |
| |
| |
| | |
Closes #950.
|
| |\ \
| |/
|/|
| |
| |
| |
| | |
Fix various warnings from clippy nightly
Closes #943
See merge request tpo/core/arti!1369
|
| | |
| |
| |
| | |
This appeases clippy-nightly.
|
| |/
|
|
|
|
|
| |
This tries to flesh out some of the details for users who may be new
to bridges and PTs.
Closes #706.
|
| | |
|
| | |
|
| |
|
|
|
| |
Formerly we would display just the first characters of the identity,
without telling you what kind of ID it was.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Relays and onion service services/clients will both need this.
I'm marking this experimental for now; we should stabilize it before
we release onion services.
|
| |
|
|
|
|
|
|
| |
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 lets us check the type of an `EncodedLinkSpec` as well, and
lets us remove an interface that took a raw u8.
|
| |
|
|
|
|
| |
This commit adds functions to convert between LinkSpec and
EncodedLinkSpec, and refactors their read/write implementations a
bit to avoid code duplication.
|
| | |
|
| |
|
|
| |
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 eliminates some duplicated code.
|
| |
|
|
|
|
|
| |
This borrows from the contained key, but not from self.
This will allow us to implement RelayId::as_bytes in terms of
RelayIdRef::as_bytes.
|
| |
|
|
| |
This removes a duplicated copy of the format strings.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Unlike linkspec, this doesn't validate the actual contents of the
specifiers. We'll use this so we can handle the linkspec list for an
introduction point in an HsDesc, and just pass it on when
constructing our circuits.
I haven't added any accessor or constructor functions, because I
don't expect to need them.
|
| | |
|
| |
|
|
| |
This eliminates hardcoded length values.
|
| |
|
|
|
| |
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.
|
| |\
| |
| |
| |
| | |
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/-/merge_requests/904#note_2858480
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|