Skip to content

Replace `Option<Pos>` with `Pos` in `ParseError`.

Nick Mathewson requested to merge nickm/arti:real_netdoc_pos into main

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 (closed).

Finally, we have to fix a test that was a bit broken because it was working around #640 (closed).

Merge request reports

Loading