| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
| | |
| | |
| | | |
Adds the actual keyword for a present object to the test.
|
| | | |
| | |
| | |
| | |
| | | |
This commit adds a test for ItemPresent in terms of encoding and
decoding.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit adds the ItemPresent type, which is intended for token types
where the mere presence implies a truthful value, such as
`tunnelled-dir-server`.
For now, it lives in `ignored_impls` because it does in fact ignore
(actually rejects) everything around the item except the keyword.
The type implements ItemValueParseable and ItemValueEncodable; both
implementations being very minimal and only parsing/emitting the
keyword.
A test will be added within the next commit.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit documents a shortcoming explained on IRC that exists with
the current derive(Transparent) and generic types that are uncovered.
See E0210.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
tor-netdoc: minor fixes arising from netstatus work
See merge request tpo/core/arti!4055
|
| | | | |
| | | |
| | | |
| | | | |
This matches C Tor and the spec.
|
| | | | |
| | | |
| | | |
| | | | |
We need to use `-`, not `_`. So use concat! stringify!.
|
| | | | |
| | | |
| | | |
| | | | |
Now it round-trips.
|
| | | |/
| |/| |
|
| |\ \ \
| |_|/
|/| |
| | |
| | | |
tor-netdoc: ParseInput: improve
See merge request tpo/core/arti!4057
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
This makes the code clearer, especially since we're going to add
attributes.
|
| | |/ |
|
| |\ \
| | |
| | |
| | |
| | | |
tor-netdoc: Avoid use of string slices in PortPolicy
See merge request tpo/core/arti!4062
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit adds a tor-netdoc test for checking for an edge case related
to UTF-8 symbols found within netdocs.
See arti#2566
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit removes the use of string slices in PortPolicy::from_str()
by making use of `str::split_once` instead.
See arti#2566
Co-authored-by: 5225225 <[email protected]>
|
| |\ \ \
| |_|/
|/| |
| | |
| | | |
tor-netdoc: No longer import crate::Result in doc::netstatus
See merge request tpo/core/arti!4050
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
This is a clearer.
|
| |\ \ \
| |_|/
|/| |
| | |
| | | |
Bump some deps that have had breaking changes
See merge request tpo/core/arti!4053
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
It is weird to have three possible states for truthiness here.
This commit removes the Option in favor of the inner type while adding a
TODO comment to somehow find a way to skip this during encoding.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Adds a TODO for using ConstantString for overload_general.
|
| | | |
| | |
| | |
| | | |
This field is taken from the spec.
|
| | | |
| | |
| | |
| | | |
This commit adds the contact field to RouterDesc.
|
| | | |
| | |
| | |
| | | |
This commit adds support for the overload-general field to RouterDesc.
|
| |/ / |
|
| |\ \
| | |
| | |
| | |
| | | |
tor-netdoc Rename NetdocUnverified trait to NetdocParseableUnverified
See merge request tpo/core/arti!4043
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Apparently, it is only correct to write
[`NetdocParseableUnverified`](derive_deftly_template_NetdocParseableUnverified),
*after* the definition of that template. Before then, the macro isn't
in scope.
Worse, rustdoc just treats it as a filename and doesn't spot the link,
so you don't get any kind of warning. I think this is an upstream bug,
https://github.com/rust-lang/rust/issues/157304
I found rustdoc's behaviour capricious. I don't intend to go through
the arti tree right now looking for similar patterns. Instead let's
hope the upstream bug gets fixed, and in the meantime do this crate::
thing when we notice we need it.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The NetdocParseableUnverified derive macro implements this
trait (amongst other things). Traits and derive macros should have
aligned names.
This is only used for parsing, so let's keep the "Parseable" part of
the name.
I don't think the effort of deprecated alias, for downstream
compatibility, is worth it, our compatibility policy notwithstanding.
|
| | |/
| |
| |
| |
| |
| |
| | |
The trait is called NetdocUnverified, but the template is
NetdocParseableUnverified. This fixes a dead docs link (which somehow
isn't spotted by rustdoc, but is instead taken to refer to a
nonexistent file).
|
| | |
| |
| |
| |
| |
| |
| |
| | |
At some earlier point in the development of this scheme, the ordering
was different (as it is in poc).
Update all the references in the docs, to the various varieties, so
that they are always plain, md, vote, like ns_type! et al take.
|
| | | |
|
| |/
|
|
| |
We do now support encoding.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
No functional change, just rustfmt.
|
| |
|
|
|
|
|
|
|
| |
This commit changes RelayPlatform::TorVersion to store the platform to
an Option<String> instead of a String because storing a missing/not
present platform as the empty String feels wrong in my opinion.
Besides, we will soon need to add encoding for this type, making now a
good time to change it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This refactors the RelayPlatform test to store the test vectors in an
array and iterate over it, comparing it with the expected output. This
is a lot better than the current version, where there is not just a lot
of copy and pasted code but also some tests that only check for an okay
value.
Unfortunately, there is not an easy way to review this with
--color-moved or something. Personally, I would recommend to review
each original test vector (i.e. a line starting with `let p =` followed
by a string literal) and verify that the exact same string literal is
still present within the new test vector. Afterwards, verifying the
assertion logic should be easy, as it is a one-liner.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Done using:
```
for crate in $(./maint/list-crates | rg '^(tor|arti-)'); do
cargo set-version -p $crate 0.43.0
done
```
|
| | |
|
| | |
|