<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-netdoc/src/parse/tokenize.rs, branch arti-v1.4.5</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.4.5</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.4.5'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2025-04-03T17:36:25Z</updated>
<entry>
<title>tor-netdoc: use more idiomatic rust</title>
<updated>2025-04-03T17:36:25Z</updated>
<author>
<name>Steven Engler</name>
<email>opara@torproject.org</email>
</author>
<published>2025-04-03T17:36:25Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=34b082ad55ae45d8ba9c96e3a255289b9ead0d57'/>
<id>urn:sha1:34b082ad55ae45d8ba9c96e3a255289b9ead0d57</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-netdoc: fix `clippy::len_zero`</title>
<updated>2025-04-03T17:32:58Z</updated>
<author>
<name>Steven Engler</name>
<email>opara@torproject.org</email>
</author>
<published>2025-04-03T17:24:08Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=5e8d0021dc3fdecc20bfdd35cb64282dda58e261'/>
<id>urn:sha1:5e8d0021dc3fdecc20bfdd35cb64282dda58e261</id>
<content type='text'>
```text
warning: length comparison to one
   --&gt; crates/tor-netdoc/src/parse/tokenize.rs:470:12
    |
470 |         if args.len() &gt;= 1 {
    |            ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.is_empty()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
note: the lint level is defined here
   --&gt; crates/tor-netdoc/src/lib.rs:9:9
    |
9   | #![warn(clippy::all)]
    |         ^^^^^^^^^^^
    = note: `#[warn(clippy::len_zero)]` implied by `#[warn(clippy::all)]`
```
</content>
</entry>
<entry>
<title>netdoc: Reject BOMs and NULs.</title>
<updated>2025-03-17T17:23:25Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2025-03-17T17:23:25Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=e36b7e84c795fa5fadfd40c93af8df4beac6fad7'/>
<id>urn:sha1:e36b7e84c795fa5fadfd40c93af8df4beac6fad7</id>
<content type='text'>
Per &lt;https://spec.torproject.org/dir-spec/netdoc.html&gt;,
our netdocs never have a BOM, and never have internal NULs.
This makes Arti reject such documents.

For arguments on why it's okay to increase parser strictness,
see the (forthcoming) proposal 356 at torspec!342,
and see older discussion at torspec#296.

Closes #1739.
</content>
</entry>
<entry>
<title>netdoc: Make some parsing init functions fallible.</title>
<updated>2025-03-17T16:55:57Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2025-03-17T16:55:57Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=f85cc0c663518edbe1c09ae2c6928e6f52cae7bb'/>
<id>urn:sha1:f85cc0c663518edbe1c09ae2c6928e6f52cae7bb</id>
<content type='text'>
I'm about to make our parsers reject some strings at construction
time, so it makes sense to have these functions become fallible.

This is a breaking change.
</content>
</entry>
<entry>
<title>Fix "clippy::manual-pattern-char-comparison" warning on nightly</title>
<updated>2024-07-28T21:48:35Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-07-28T21:41:26Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=1c42108e5f82c69be358f832aea7fa12b4a21670'/>
<id>urn:sha1:1c42108e5f82c69be358f832aea7fa12b4a21670</id>
<content type='text'>
This warning suggests using `[a,b]` as a Pattern
when it sees a search for `|ch| ch == a || ch == b`.

(All of our supported rust versions allow this kind of Pattern.)
</content>
</entry>
<entry>
<title>Run maint/add_warning.</title>
<updated>2024-03-13T16:30:53Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-03-13T16:30:53Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=c0c9bd15d42897825dd0ab3d3b8dd1c17bd6320c'/>
<id>urn:sha1:c0c9bd15d42897825dd0ab3d3b8dd1c17bd6320c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Run maint/add_warning to add lint block everywhere</title>
<updated>2023-08-23T09:34:00Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2023-08-22T14:28:12Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=42df88d6bf6dbb460d2e5e1cd4838aafaffbe9ac'/>
<id>urn:sha1:42df88d6bf6dbb460d2e5e1cd4838aafaffbe9ac</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Run maint/add_warning to actually apply new lint allows</title>
<updated>2023-07-10T12:49:51Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2023-07-10T11:19:32Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=473447a82e099fd52a674c28f5bc24b3e05208c0'/>
<id>urn:sha1:473447a82e099fd52a674c28f5bc24b3e05208c0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>netdoc: Rename parse_error_kind() to netdoc_error_kind().</title>
<updated>2023-05-11T17:39:40Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2023-05-11T17:39:40Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=04228933730a0727ea75e75770eda180191ff93a'/>
<id>urn:sha1:04228933730a0727ea75e75770eda180191ff93a</id>
<content type='text'>
`ParseErrorKind` was renamed to `NetdocErrorKind`, so we need to
rename this acccessor too.

Signed-off-by: Gabriela Moldovan &lt;gabi@torproject.org&gt;
</content>
</entry>
<entry>
<title>netdoc: Rename `ParseError{Kind, Source}` to `NetdocError{Kind, Source}`.</title>
<updated>2023-05-10T14:52:28Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2023-05-10T14:40:57Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=099b2315b015b96cd8163a364f92810ea4982cfa'/>
<id>urn:sha1:099b2315b015b96cd8163a364f92810ea4982cfa</id>
<content type='text'>
`ParseErrorSource` was originally meant to represent a parsing error,
this enum has since gained some variants that aren't really parsing
related (`Signature`, `CertSignature`, `UntimelyDescriptor`).

Since this error type is now used for general-purpose netdoc errors,
let's rename `ParseError{Kind, Source}` to `NetdocError{Kind, Source}`.

Signed-off-by: Gabriela Moldovan &lt;gabi@torproject.org&gt;
</content>
</entry>
</feed>
