summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-06-26 10:20:00 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-06-26 10:20:00 +0200
commit16553c8bd46f16811691bb0f657e0ee6593697ef (patch)
tree0359c8c747b1088423762ed67805503d9ee751f1
parentc301970937cb5fb5e2b831ce8fdcde5e2267f343 (diff)
openpgp: Fix warnings.
- rustc now understands exhaustive matches on integers.
-rw-r--r--openpgp/src/packet/mod.rs6
-rw-r--r--openpgp/src/parse/parse.rs1
2 files changed, 0 insertions, 7 deletions
diff --git a/openpgp/src/packet/mod.rs b/openpgp/src/packet/mod.rs
index e7529e32..2f4572ce 100644
--- a/openpgp/src/packet/mod.rs
+++ b/openpgp/src/packet/mod.rs
@@ -156,12 +156,6 @@ impl BodyLength {
Ok(BodyLength::Partial(1 << (octet1 & 0x1F))),
255 => // Five octets.
Ok(BodyLength::Full(bio.read_be_u32()?)),
- _ =>
- // The rust compiler doesn't yet check whether an
- // integer is covered.
- //
- // https://github.com/rust-lang/rfcs/issues/1550
- unreachable!(),
}
}
diff --git a/openpgp/src/parse/parse.rs b/openpgp/src/parse/parse.rs
index a14d6420..9d05bc66 100644
--- a/openpgp/src/parse/parse.rs
+++ b/openpgp/src/parse/parse.rs
@@ -1376,7 +1376,6 @@ impl Key4 {
255 => {
return php.fail("unsupported secret key encryption");
}
- _ => unreachable!()
};
Some(sec)