summaryrefslogtreecommitdiffstats
path: root/openpgp/src/packet_pile.rs
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-04-07 18:45:55 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2021-04-09 13:13:59 +0200
commit76f2e0ed8e30a0d1cde749f3444bd8a4c81bea87 (patch)
tree0085cfecde9d35b15c98fc8650734ecf5d61358f /openpgp/src/packet_pile.rs
parentbaecfecbf953aa9e40f16084b927f35b69efc8f0 (diff)
Lint: Remove redundant returns.
- https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
Diffstat (limited to 'openpgp/src/packet_pile.rs')
-rw-r--r--openpgp/src/packet_pile.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/openpgp/src/packet_pile.rs b/openpgp/src/packet_pile.rs
index 8aef9e82..17d53143 100644
--- a/openpgp/src/packet_pile.rs
+++ b/openpgp/src/packet_pile.rs
@@ -283,7 +283,7 @@ impl PacketPile {
return None;
}
- return packet;
+ packet
}
/// Returns a mutable reference to the packet at the location
@@ -433,7 +433,7 @@ impl PacketPile {
.expect("The above packets are structured containers");
}
- return Err(Error::IndexOutOfRange.into());
+ Err(Error::IndexOutOfRange.into())
}
/// Returns an iterator over all of the packet's descendants, in
@@ -628,7 +628,7 @@ impl<'a> TryFrom<PacketParserResult<'a>> for PacketPile {
}
}
- return Ok(PacketPile { top_level });
+ Ok(PacketPile { top_level })
}
}