<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-netdoc/src/parse/parser.rs, branch arti-v1.1.4</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.1.4</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.1.4'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2023-02-15T17:17:01Z</updated>
<entry>
<title>tor-netdoc: Remove many needless calls to .iter() and .into_iter()</title>
<updated>2023-02-15T17:17:01Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2023-02-15T16:18:53Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=4a91c732fe4b597ad4e90564ca4630ac3048938a'/>
<id>urn:sha1:4a91c732fe4b597ad4e90564ca4630ac3048938a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-netdoc: Have sectionrules.parse take I, not &amp;mut I</title>
<updated>2023-02-15T17:16:57Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2023-02-15T16:14:15Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=7491424ee97412fcccb88ce8e4ae006874285cd9'/>
<id>urn:sha1:7491424ee97412fcccb88ce8e4ae006874285cd9</id>
<content type='text'>
There's a blanket impl of Itertor for &amp;mut impl Iterator, so this
isn't necessary, and it prevents us passing iterators by value
producing syntactic vinegar.
</content>
</entry>
<entry>
<title>netdoc: Require that unrecognized tokens be handled explicitly.</title>
<updated>2023-02-03T16:33:30Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-02-03T16:33:30Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=73199ebf68815f7bc1ef6f85f5ce04d3e2620a2e'/>
<id>urn:sha1:73199ebf68815f7bc1ef6f85f5ce04d3e2620a2e</id>
<content type='text'>
Now we require that, for all `SectionRules`, either the caller say
how to handle unrecognized tokens (using `.add(UNRECOGNIZED...)`),
or that they explicitly reject unrecognized tokens (using
`reject_unrecognized`()`.)

This solution uses an assert!() rather than an Error to indicate
failure.  I say that's fine, since
  1. This is a crate-internal API.
  2. We never dynamically construct SectionRules according to
     different behavior: they are always prefabricated in a fixed
     code block.  Thus, if we test a parser at all, we will make
     sure that its SectionRules are well-formed.

I considered and explicitly rejected a solution where the builder
had to be finalized with separate methods `build_strict()` or
`build_tolerant()`: It's too easy IMO for the caller to forget what
these call means.

Prevents further recurrences of #752.

Closes #752.
</content>
</entry>
<entry>
<title>netdoc: Switch SectionRules building to use a Buidler pattern.</title>
<updated>2023-02-03T16:14:00Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-02-03T16:14:00Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=13d5452e2e6052e358da95c0becd7b522cf1183f'/>
<id>urn:sha1:13d5452e2e6052e358da95c0becd7b522cf1183f</id>
<content type='text'>
No new behavior yet.
</content>
</entry>
<entry>
<title>Allow clippy::unchecked_duration_subtraction in tests</title>
<updated>2023-01-27T13:28:02Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-01-27T13:01:45Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=a6dd92843edf2bd4c58de62a0d562921e4191ada'/>
<id>urn:sha1:a6dd92843edf2bd4c58de62a0d562921e4191ada</id>
<content type='text'>
This panics on error, and we're fine with a panic on misbehavior in
tests.
</content>
</entry>
<entry>
<title>Elide a bunch of lifetimes.</title>
<updated>2023-01-27T13:28:02Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-01-27T12:55:18Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ed74c6293191b28e52b839ebb61e79a8ed955a45'/>
<id>urn:sha1:ed74c6293191b28e52b839ebb61e79a8ed955a45</id>
<content type='text'>
Clippy now warns about these; I'm not sure how these warnings snuck
up on us.
</content>
</entry>
<entry>
<title>test lint blocks: Add many many automatically</title>
<updated>2022-12-12T18:00:30Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2022-12-12T17:58:40Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=125a455bdcca841931f33f83f206e57637ae85c4'/>
<id>urn:sha1:125a455bdcca841931f33f83f206e57637ae85c4</id>
<content type='text'>
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
</content>
</entry>
<entry>
<title>Fix a bunch of "needless borrow" warnings on nightly</title>
<updated>2022-11-18T15:12:05Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-11-18T15:12:05Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=d51162e55b19036528b4fafc1d4b15c8d9d23a04'/>
<id>urn:sha1:d51162e55b19036528b4fafc1d4b15c8d9d23a04</id>
<content type='text'>
It looks like, despite a few false starts, they've got this warning
right; there weren't any false positives.
</content>
</entry>
<entry>
<title>Replace `Option&lt;Pos&gt;` with `Pos` in `ParseError`.</title>
<updated>2022-11-15T21:58:23Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-11-15T21:58:23Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=39615516fd30f5aa8da6ece97b6c5a0fdb9d8f9e'/>
<id>urn:sha1:39615516fd30f5aa8da6ece97b6c5a0fdb9d8f9e</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>Netdoc: test enforcement for items that mustn't take objects.</title>
<updated>2022-06-07T16:45:57Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-05-26T17:59:05Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=97c8c27514d390f296bb9b4bf3ef08eea729d57d'/>
<id>urn:sha1:97c8c27514d390f296bb9b4bf3ef08eea729d57d</id>
<content type='text'>
Found via coverage.
</content>
</entry>
</feed>
