| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
I don't expect that we'll need this.
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| |\ \ \ \ \ \ \ \
| | |_|_|/ / / /
| |/| | | | | /
| |_|_|_|_|_|/
|/| | | | | | |
http-connect: Improve error reporting.
See merge request tpo/core/arti!3476
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It makes more sense to have the conversion here, so it can use an
exhaustive match over ErrorKind.
This isn't the final API; I'm just moving the code from `arti`.
|
| |\ \ \ \ \ \
| |_|_|_|/ /
|/| | | | |
| | | | | |
| | | | | | |
tor-netdoc: Misc docs improvements (mostly parse2)
See merge request tpo/core/arti!3479
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
We're going to have separate traits for encoding.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
Once upon a time this trait handled multiplicity. But it doesn't any more.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is not impl for all FromStr. We have NormalItemArgument now.
|
| |/ / / / /
| | | | |
| | | | |
| | | | | |
This was added at some point, but not documented.
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
tor-netdoc: Make much more of encode module public
See merge request tpo/core/arti!3471
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3471#note_3288716
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
clippy points out that if argument-less `new` can exist, so should
Default.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
My planned new derive for encoding will be pub, but cfg gated, like
parse2 is.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
My planned encoding derive macro is going to provide keywords as
literal strings.
(The purpose of this trait is to allow the old parser to be generic
over its keyword constants, not to provide type-safety against passing
non-keyword strings to document encoders. Such bugs aren't very
likely and will be especially unlikely when we're deriving encoders.)
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
My planned encoding derive macro is not going to use `decl_keyword!`
but will need to call `NetdocEncoder::item`.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
NetdocEncoder::item uses it this way. Presumably it is right at
least in those cases where this method is called.
The only implementor of this trait right now is the output from
`decl_keyword!` in the old parser, which is (generally) expected to be
the actual keyword.
|
| |\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Replace RelayFlags, using enumset
See merge request tpo/core/arti!3477
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3477#note_3289536
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
EnumSet<RelayFlag> implements PartialEq, so we can derive this rather
than open-coding it.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The only thing generated by this macro is `set_iter_keywords` which
is only used in the test to check that the macro call is correct.
Abolish it all.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This existed because it was once an impl on the old RelayFlags.
Now, it's on RelayFlag which is sensibly FromStr.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Abolish the constants with the transitional names.
This also abolishes the controversial name `H_S_DIR`, which Rust case
transformation rules generated from `HSDir`.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Now:
`RelayFlag` is a single flag, which is a different type to
`RelayFlags`.
`FromStr` and `Display` are now implemented in a normal way for a
single flag.
We don't use bitflags, with its funky input syntax, any more.
Instead, we have a normal enum.
No longer is it possible to have a `RelayFlags` with "unknown bits"
set (whatever that means). (Therefore, an associated test case for
this is now gone.)
The names are principally specified just as enum variant names. The
enum variant names can be identical to the network document keywords.
Briefly, we provide constants in capitals, for the benefit of all the
call sites. That means that *this* commit can contain only the
primary changes.
A few macro-generated things have been adjusted in this commit, but
they are actually going to go away.
Indentation is now wrong. We'll fix that at the end.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This will reduce noise in the actual functional change commit.
(But, this is all going to go away. That will bei justified on its
merits, after the overhaul is done.)
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
bitflags provides .bits() but enumset provides .as_repr().
Make this change at all call sites now.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We're going to separate RelayFlag from RelayFlags.
We could continue to provide a bunch of constant values for
RelayFlags, for each individual type, but that would involve an ad-hoc
derive, and would still be a bit of an unusual API.
Instead, we're going to make ``RelayFlag` a normal enum.
In this commit, we change everyone to refer to it by its singular
name. Hopefully separating out this bulk change makes both this, and
the core commit, easier to review.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Many call sites pass one flag. We're going to have a type-level
distinction between a single flag and a set. But that's annoying at
many of the call sites which want to specify a fixed single flag.
Note that `set_flags` doesn't only set flags. It replaces them.
|
| | |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Implement this on DocRelayFlags instead, since that's what it returns.
And change the name to from_item_consensus to highlight its semantic
restriction. (It's not generic over the implied flags, so it can only
do one thing.)
|
| |\ \ \ \ \ \
| |/ / / / /
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
maint: Upgrade num-bigint-dig to 0.8.6
Closes #2110
See merge request tpo/core/arti!3475
|
| | |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This appears to resolve the warning:
> warning: the following packages contain code that will be rejected by a future version of Rust: num-bigint-dig v0.8.4
|
| |\ \ \ \ \
| |/ / / /
|/| | | |
| | | | |
| | | | | |
tor-netdoc: Overhaul RelayFlags, and provide for conditionally retaining unknown info
See merge request tpo/core/arti!3454
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Some of the new formatting is a bit unfortunate. Ah well.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3454#note_3288967
|