summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-09-21 18:41:02 +0300
committerLars Wirzenius <liw@sequoia-pgp.org>2021-09-30 08:31:05 +0300
commit7dea96c33715e762dec084fd30ddd5615133e746 (patch)
treede44bf76664e4a605c723542c9627d782655da93 /openpgp/src/parse.rs
parent9f789effd3a415e61dfdeae58cf690a2cb7f053a (diff)
Drop unnecessary mut when passing a reference to a function
Reduce this: foo(&mut bar): into foo(&bar); when the function does not expect a mutable reference, just a read-only reference. The extra mut serves no function, but can confuse the reader. Found by clippy lint unnecessary_mut_passed: https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
Diffstat (limited to 'openpgp/src/parse.rs')
-rw-r--r--openpgp/src/parse.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/parse.rs b/openpgp/src/parse.rs
index eacded35..068bdd6b 100644
--- a/openpgp/src/parse.rs
+++ b/openpgp/src/parse.rs
@@ -4807,7 +4807,7 @@ impl <'a> PacketParser<'a> {
tracer!(TRACE, "PacketParser::finish", indent);
if self.finished {
- return Ok(&mut self.packet);
+ return Ok(&self.packet);
}
let recursion_depth = self.recursion_depth();
@@ -4848,7 +4848,7 @@ impl <'a> PacketParser<'a> {
self.finished = true;
- Ok(&mut self.packet)
+ Ok(&self.packet)
}
/// Hashes content that has been streamed.