| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|