<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-netdoc/src/err.rs, branch arti-v1.1.1</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.1</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.1.1'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2022-11-15T21:58:23Z</updated>
<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>tor-netdoc: Add a new ErrorKind for EmptyLine.</title>
<updated>2022-11-15T16:27:43Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-11-15T16:01:51Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=bc7780bffd218699a4869eb76f97595a4f0cbc8d'/>
<id>urn:sha1:bc7780bffd218699a4869eb76f97595a4f0cbc8d</id>
<content type='text'>
Empty lines were previously reported as BadKeyword, which is
confusing.
</content>
</entry>
<entry>
<title>tor-proto: split and elaborate tor_bytes::Error instances</title>
<updated>2022-06-23T19:42:45Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-06-23T19:42:45Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=38004a4f4dd3aa99b81b6585039e81dc77c17f32'/>
<id>urn:sha1:38004a4f4dd3aa99b81b6585039e81dc77c17f32</id>
<content type='text'>
Some of these were for decoding particular objects (we now say
what kind of objects), and some were unrelated tor_cert errors that
for some reason we had shoved into a tor_bytes::Error.

There is now a separate tor_cert::CertError type, independent from
tor_cert's use of `tor_bytes::Error` for parsing errors.
</content>
</entry>
<entry>
<title>Netdoc: add accessor to error for ParseErrorKind</title>
<updated>2022-06-07T16:45:57Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-05-26T17:40:19Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=102600e1c7d9cb39c5680df3e19bed07c3eea7c7'/>
<id>urn:sha1:102600e1c7d9cb39c5680df3e19bed07c3eea7c7</id>
<content type='text'>
The kind type was already public, but we didn't give the user any
way to get it.
</content>
</entry>
<entry>
<title>Resolve the new `derive_partial_eq_without_eq` lint.</title>
<updated>2022-05-23T16:55:37Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-05-23T16:32:31Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=546ae3000eb179aedc97de30b0ccdb1d45b93395'/>
<id>urn:sha1:546ae3000eb179aedc97de30b0ccdb1d45b93395</id>
<content type='text'>
It's a little overzealous sometimes, but it's mostly to the good.
</content>
</entry>
<entry>
<title>Replace a match with some as_ref and as</title>
<updated>2022-03-16T14:41:04Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2022-03-16T14:41:04Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=7564fabd687baf06f356ce22af8ae890ad8f17b7'/>
<id>urn:sha1:7564fabd687baf06f356ce22af8ae890ad8f17b7</id>
<content type='text'>
The match was doing a deref coercion.

Found by current nightly's needless_match (whose suggestion doesn't
compile, https://github.com/rust-lang/rust-clippy/issues/8551 )
</content>
</entry>
<entry>
<title>Fix a rustdoc error.</title>
<updated>2022-02-15T18:46:58Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-02-15T18:46:58Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=7c7bf2bd03c3f0675ab97b06affc6ee53c8222b7'/>
<id>urn:sha1:7c7bf2bd03c3f0675ab97b06affc6ee53c8222b7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refactor tor-netdoc a bit more, to use Bug right.</title>
<updated>2022-02-15T15:22:38Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-02-15T15:22:38Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=6bd21d43724dd31fba954bd5d88b38c96a78e756'/>
<id>urn:sha1:6bd21d43724dd31fba954bd5d88b38c96a78e756</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Minimal compilation fix: InternalError=&gt;Bug</title>
<updated>2022-02-15T15:13:08Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-02-15T15:13:08Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=13f39ed8967bc49b0824317116cfddc3331bc690'/>
<id>urn:sha1:13f39ed8967bc49b0824317116cfddc3331bc690</id>
<content type='text'>
This is a followup for !314 and !310 to fix compilation on main.
</content>
</entry>
<entry>
<title>Refactor tor_netdoc::Error</title>
<updated>2022-02-14T18:08:28Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-02-14T18:08:28Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=b6d23c36bef1322e4fc6f89769222daa91c4d8f3'/>
<id>urn:sha1:b6d23c36bef1322e4fc6f89769222daa91c4d8f3</id>
<content type='text'>
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.
</content>
</entry>
</feed>
