aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc/netstatus/dir_source.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-netdoc: Replace string slices with str::get() in doc (fmt)Clara Engler2026-06-241-1/+4
| | | | No functional change, just reformatting.
* tor-netdoc: Replace string slices with str::get() in docClara Engler2026-06-241-2/+1
| | | | | | | | | | | | This commit replaces the use of string slices with str::get() in all document related code. While this is not a perfect replacement for it, the relevant parts in the code heavily depend upon the byte offsets returned by the low level (legacy) parser where changing it would lead to a very big refactoring. Nonetheless, this approach is better because returning a bug is better than crashing.
* everywhere: Add #[allow(clippy::string_slice)]Clara Engler2026-06-091-0/+1
| | | | | | | | This commit adds #[allow(clippy::string_slice)] to all functions in the code where string slices are used, alongside a TODO comment. We do this add the function header to have it consistent, as things like expression based allow's are still experimental.
* tor-netdoc: Un-gate features impls in doc/netstatus/dir_source.rs (rewrap)Ian Jackson2026-04-281-4/+1
|
* tor-netdoc: Un-gate features impls in doc/netstatus/dir_source.rsIan Jackson2026-04-281-8/+4
| | | | There are no outstanding TODOs here.
* tor-netdoc: consensus authority section: ConsensusAuthoritySectionIan Jackson2026-04-271-2/+106
| | | | | | | | | | | | | | | | | | | Replace poc code with new ConsensusAuthoritySection. This is an entirely new parsing approach. Key differences: * We parse the arguments to dir-source, which poc didn't. * We don't clone the input and fully parse the first item; instead, we dismantle the dir-source line ad-hoc to determine the item type. * Rather than a Vec of Enums, we parse into two Vecs of the different entry types. The few lines that aren't rewritten show up as moved in git show --color-moved --color-moved-ws=allow-indentation-change but I suggest reviewing the new implementation de novo.
* tor-netdoc: consensus authority section: SupersededAuthorityKeyIan Jackson2026-04-271-1/+118
| | | | | This is the type corresponding to a "superseded authority key entry", which is a single dir-source line with a weird nickname.
* tor-netdoc: DirSource: move to new dir_source moduleIan Jackson2026-04-271-0/+57
This is going to handle the bizarre `-legacy` nickname encoding for superseded authority keys. That's going to be a fair amount of code, some derived from DirSource. Make a module for it all. We're going to take a different approach that in poc. So there's going to be all-new code and then the poc version will be deleted. They don't resemble each other very much. In this commit: just code motion, and the creation of the new module with associated doc comment. Review with --color-moved.