| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| |
|
|
| |
We'll use this in the netdoc builder, but it naturally lives here.
|
| |
|
|
|
|
|
|
|
| |
Rename from _keyword_, since this actually checks the *multiple*
keywords that can appear in an object's BEGIN line.
Make this clear in the doc comment.
Expose it for use by the netdoc builder.
|
| |
|
|
| |
The document builder wants these too.
|
| |
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| |
|
|
|
|
|
| |
This is the hunks from running the rune in maint/adhoc-add-lint-blocks
but which require some subsequent manual fixup: usually, deleting
now-superfluous outer allows, but in some cases manually putting back
lints that the adhoc script deleted.
|
| |
|
|
| |
These slipped in while nightly was broken.
|
| |
|
|
|
| |
It looks like, despite a few false starts, they've got this warning
right; there weren't any false positives.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We already have `Pos::Unknown` for an error at an unknown
location and `Pos::None` for an error where no location is
sensible. There's no reason to have an additional `Option` here.
Additionally, the use of `Option` gave us a bug where our old
`ParseError::at_pos()` method didn't actually set the position
unless the position was already set. That's not what we want!
Fixes #640.
Finally, we have to fix a test that was a bit broken because it was
working around #640.
|
| | |
|
| | |
|
| |
|
|
|
| |
Empty lines were previously reported as BadKeyword, which is
confusing.
|
| |
|
|
|
|
| |
In addition to the usual "You named that method wrong!" errors, we
have a new rustdoc error that complains about bogus "HTML tags" that
are actually unquoted usage of types like `Result<Foo>`.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Without this, clippy is error-free, but `cargo test` somehow gives a
warning.
|
| |
|
|
| |
Found via coverage.
|
| | |
|
| | |
|
| |
|
|
| |
This is ridiculous.
|
| |
|
|
|
| |
We want to supress the unused_macro_rules lint in one place but it's
new in Nightly and this triggers yet another lint.
|
| |
|
|
|
|
|
| |
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.)
|
| |
|
|
|
| |
This enum was otiose: its set of valid values is precisely those of a
Vec. (Indeed what would TokVal::Multi(vec![]) have meant?)
|
| |
|
|
| |
std::slice::from_ref exists. Spotted while reviewing !400
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
We're assuming that prop285 is accepted in some form.
|
| |
|
|
|
| |
[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.]
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
I'm alright with allowing cognitive-complexity violations in the
tests.
|
| | |
|
|
|
This will cause some pain for now, but now is really the best time
to do this kind of thing.
|