summaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/parse
Commit message (Collapse)AuthorAgeFilesLines
* Replace `base64` crate with `base64ct` crateArturo Marquez2022-06-211-3/+3
| | | | | | | Note: the `base64ct` crate rejects invalid characters when the decoding is done on padded strings. However, the `FromStr` impl for `B64` can have both padded **and** unpadded inputs, so all inputs are now padded first, before decoding.
* Add one more "allow" to tor_netdoc::parse::macros.Nick Mathewson2022-06-151-0/+1
| | | | | Without this, clippy is error-free, but `cargo test` somehow gives a warning.
* Netdoc: test enforcement for items that mustn't take objects.Nick Mathewson2022-06-071-0/+6
| | | | Found via coverage.
* netdoc: remove an unused method.Nick Mathewson2022-06-071-12/+0
|
* netdoc: Test more accessors for tokenized documents.Nick Mathewson2022-06-072-4/+20
|
* lints: Suppress unknown lints in a way that works on nightly tooIan Jackson2022-05-311-2/+4
| | | | This is ridiculous.
* tor-netdoc: Allow suppressing unknown lintsIan Jackson2022-05-271-0/+2
| | | | | We want to supress the unused_macro_rules lint in one place but it's new in Nightly and this triggers yet another lint.
* tor-netdoc: Suppress new "unused_macro_rules" lint in one placeIan Jackson2022-05-271-0/+1
| | | | | | | The compiler can apparently tell that we aren't generating compile errors! Also that we're not yet using a feature provided here. (New lint in currently Nightly.)
* tor-netdoc: Actually, make TokVal be a VecIan Jackson2022-03-111-46/+20
| | | | | This enum was otiose: its set of valid values is precisely those of a Vec. (Indeed what would TokVal::Multi(vec![]) have meant?)
* Remove a pointless sliceIan Jackson2022-03-111-10/+7
| | | | std::slice::from_ref exists. Spotted while reviewing !400
* Refactor tor_netdoc::ErrorNick Mathewson2022-02-143-51/+80
| | | | | | | | | | | | | | | This error type doesn't impement HasKind, since the kind will depend on context. However, the existing implementation was pretty messy and inconsistent: Some errors had positions, some didn't. Some took messages as str, some as String. Some had internal errors that were somewhat orthogonal to their actual types. This commit refactors tor_netdoc::Error to use a ParseErrorKind, and adds a set of convenience functions to add positions and messages to the errors that need them.
* clippy: Suppress a warningIan Jackson2022-01-191-0/+3
|
* Change an UTF-8 XXX to a TODO.Nick Mathewson2021-12-201-1/+2
| | | | We're assuming that prop285 is accepted in some form.
* address lint warningsDaniel Eades2021-12-091-8/+8
| | | | | [Edited by nickm: This applies one of Daniel's fixes in place of one of Trinity's: Trinity says it's a bit cleaner, and I agree.]
* fix nightly clippy errorsTrinity Pointard2021-12-091-4/+3
|
* add semicolons if nothing returnedDaniel Eades2021-11-251-1/+1
|
* 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.
* Fix/suppress a few more clippy lints in tests.Nick Mathewson2021-09-082-0/+2
| | | | | I'm alright with allowing cognitive-complexity violations in the tests.
* fix/silence clippy lints in test modulesDaniel Eades2021-09-082-8/+10
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-275-0/+1696
This will cause some pain for now, but now is really the best time to do this kind of thing.