aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/util.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-netdoc: testing: Expose regsubIan Jackson2026-07-301-8/+0
| | | | Involves code motion. Review with --color-moved.
* tor-netdoc: testing: Expose assert_eq_or_diffIan Jackson2026-07-301-57/+0
| | | | Involves lots of code motion. Review with --color-moved.
* tor-netdoc: rangemap_mutate_range: New functionIan Jackson2026-07-021-0/+1
| | | | This will be used for exit port summary calculations.
* tor-netdoc tests: Make regsub take a ReplacerIan Jackson2026-06-221-1/+1
| | | | This will let us do more exciting munging more clearly.
* tor-netdoc: tests: Add regsub utility functionIan Jackson2026-06-171-0/+8
| | | | | We're going to need this for fudges in round trip tests of consensuses etc.
* tor-netdoc: Replace ad-hoc pseudo-diff with unidiff from imraIan Jackson2026-06-111-0/+57
| | | | | | And wrap it up nicely in an assert_eq_or_diff macro. I've tested the output by sabotaging one of the test2 tests.
* tor-netdoc: Turn DirectorySignatureHashAlgo back into a normal structIan Jackson2026-04-291-29/+0
| | | | | | Abolish the terrible macro. Review with --color-moved-ws=allow-indentation-change --color-moved.
* tor-netdoc: derive Display for DirectorySignatureHashAlgoIan Jackson2026-04-291-1/+1
|
* tor-netdoc: Promote DirectorySignatureHashAlgo from poc as nasty macroIan Jackson2026-04-291-0/+29
| | | | | | | | | | | | | | We want DirectorySignatureHashAlgo for prod's directory Signature type. However, for complex cfg gate and macro scoping reasons, we can't just move the definition out of poc. Hence this rather unpleasant intermediate state. This will go away, and become normal again, when we can abolish poc's signatures and have poc use a prod signature type. Review with git show --color=always --color-moved-ws=allow-indentation-change --color-moved
* tor-netdoc: Provide AsMutSelf derive macroIan Jackson2026-03-191-0/+41
| | | | We're going to want this for sets of netdoc signature hashes.
* Move intern from tor-netdir to tor-basic-utils and make it pubNick Mathewson2025-12-031-1/+0
|
* tor-netdoc: No longer impl Sealed for RouterStatusIan Jackson2025-08-261-1/+1
| | | | | We don't need this since RouterStatus no longer implements any sealed traits.
* tor-netdoc: Change an allow to an expectIan Jackson2025-08-261-1/+1
| | | | | (This will make the build more fragile, but it will also spot an unnecessary allow.)
* tor-netdoc: Abolish ParseRouterStatus and make several things not pubIan Jackson2025-08-261-0/+1
| | | | | | | The methods in ParseRouterStatus can now be inherent. This starts a cascade of unused stuff, and stuff which doesn't need to be pub any more.
* netdoc: Note new feature in itertoolsNick Mathewson2023-06-261-1/+5
|
* tor-netdoc: move PeekableIterator to util.rsIan Jackson2023-02-151-0/+33
| | | | We're going to want this a bit more widely.
* tor-netdoc: Delete now-unused PauseAt typeIan Jackson2023-02-151-149/+0
|
* tor-netdoc: Replace use of PauseAt::new_pred()Ian Jackson2023-02-151-0/+1
| | | | | | | We can just make a new PauseAt, since it can take the inner peekable iterator by mutable reference. This seems to tidy the code up a bit too.
* tor-netdoc: Provide new batching_split_beforeIan Jackson2023-02-101-0/+2
| | | | | | | | | | | | There will be two call sites to demonstrate it. Eventually maybe this will want to be in tor-basic-utils, since it doesn't depend on any of the tor-netdoc types. But it would be sensible to wait until the situation with PeekableIterator and Itertools is improved. For now we make this #[doc(hidden)] to avoid it becoming part of our stable API.
* tor-netdoc: util: use super::* in testsIan Jackson2023-02-101-2/+1
| | | | Not xure how my MR to try to do this everyone missed this one.
* tor-netdoc: util: Add standard lint block to testsIan Jackson2023-02-101-0/+10
| | | | Not xure how my MR to try to do this everyone missed this one.
* tor-netdoc: Put the "routerdesc" document type behind a feature.Nick Mathewson2021-11-121-0/+1
| | | | | | | | | | Nothing in arti currently uses this document type. Eventually it will be useful for relays and for bridge clients. I've left the "SHA1 digest of a router descriptor" type available unconditinoally, however, since it does get used in a few places. Part of #125.
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+151
This will cause some pain for now, but now is really the best time to do this kind of thing.