summaryrefslogtreecommitdiffstats
path: root/openpgp
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2022-05-11 14:00:47 +0200
committerJustus Winter <justus@sequoia-pgp.org>2022-05-11 14:01:36 +0200
commitd622f0e35b155c686329ed99aa6042469f3f3cbb (patch)
tree8ed743e7e904efea9b59d51cd7cf0630353b4139 /openpgp
parenta72e2448821d90a35d4c5e5e98d4446178e8d8ec (diff)
openpgp: Update comment.
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/src/cert/parser/low_level/mod.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/openpgp/src/cert/parser/low_level/mod.rs b/openpgp/src/cert/parser/low_level/mod.rs
index e4b2b7ad..eef79987 100644
--- a/openpgp/src/cert/parser/low_level/mod.rs
+++ b/openpgp/src/cert/parser/low_level/mod.rs
@@ -22,12 +22,18 @@ pub(crate) use self::grammar::CertParser;
// ParseError<usize, Tag, Error>.
//
// Justification: a Token is a tuple containing a Tag and a Packet.
-// This function essentially drops the Packet. Dropping the packet is
-// necessary, because packets are not Sync, but Fail, which we want
-// to convert ParseErrors to, is. Since we don't need the packet in
+// This function essentially drops the Packet. Dropping the packet was
+// necessary, because packets were not Sync, but Error, which we want
+// to convert ParseErrors to, was. Since we don't need the packet in
// general anyways, changing the Token to a Tag is a simple and
// sufficient fix. Unfortunately, this conversion is a bit ugly and
// will break if lalrpop ever extends ParseError.
+//
+// This justification is no longer up-to-date because Packet is now
+// also Sync. However, we didn't catch this when we made Packet Sync,
+// and now the justification is simply that CertParserError::Parser(_)
+// expects a Tag, not a Packet. It is not public, so we could change
+// it.
pub(crate) fn parse_error_downcast(e: ParseError<usize, Token, Error>)
-> ParseError<usize, Tag, Error>
{