| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |\ \
| | |
| | |
| | |
| | | |
Fix new warnings from Rust 1.95
See merge request tpo/core/arti!3902
|
| | | |
| | |
| | |
| | |
| | | |
Rust 1.95 warns us that this is an experimental API that could be
stabilized in the future.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Geoip: Move the data into the .data segment completely, and into an out-of-tree crate.
See merge request tpo/core/arti!3900
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This is perma-unstable: We'll use it to make an export tool,
but that's it.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This lets us guarantee that every bit sequence is a valid
Option<CountryCode>.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This change allows us to provide the parts of the DenseRangeMap
on the data segment.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This abolishes the NetDefn type, and turns DenseRangeDb into a map to
one or (optionally!) two types.
For the DBs we ship, which don't have asn information, this saves
about 2.5 MiB.
(It also probably saves a bit more, since the niche optimization
didn't apply to NetDefn as it existed before, since it tried
to distinguish Some(None,None) from None.)
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This required correcting some errors in our previous
ersatz geoip databases.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This type is more space-efficient than RangeInclusiveMap
in the case where most ranges do not have gaps between them.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
See torspec#401 and
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3864#note_3397715
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3864#note_3397714
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Now it follows, rather than precedes, the parse2_impls and
encode_impls modules that it imports things from.
Pure code motion apart from deleting the todo.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
This is going to be used for encoding too.
|
| | | | |
| | | |
| | | |
| | | | |
We don't need the helper struct for this.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We're going to want this macrology to generate a encoder
implmeentation too. It's most convenient to make this its own module,
separating it from parse2_impls.
Enable the module if encoding is enabled, decorating its
parsing-related contents with the appropriate cfg.
Use pub(super) to export the encoding-related imports, so that we
don't end up with endlessly duplicated import lists.
Now there is place where we can put the encoder.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Start a new encode_impls module.
The pub(super) will be used in a moment.
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
This is what we did for authcert.rs and it worked well there.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Add debugging support to ItemValueParseable derive
See merge request tpo/core/arti!3881
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
With
cargo test --all-features -p tor-netdoc -- --no-capture test2
the output now contains, amongst many other things:
netdoc TestItem parse: item start, "test-item", "N", Some("TEST OBJECT")
netdoc TestItem parse: field needed, normal, args=1, "N"
netdoc TestItem parse: field optional, normal, args=Option<_>, ""
netdoc TestItem parse: field rest, normal, args=Vec<_>, ""
netdoc TestItem parse: field object, object, object=1, Some(("TEST OBJECT", Ok(5)))
netdoc TestItem parse: item complete Ok
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | | |
So far this just abolishes a duplicate P.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We're going to want tio reuse dtrace from here in the
ItemValueParseable derive (which doesn't use
NetdocSomeItemsParseableCommon because it derives for one item type,
not a document containing multiple items).
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Without this adding `#[deftly(netdoc(debug))]` can fail to build,
because the encoding module doesn't have `io::Write` in its `pub use`.
(Unlike parse2, it doesn't have a separate macro prelude.)
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Ie for "arguments" that don't actually appear.
|
| | | | | | |
|
| | | | | | |
|