diff options
author | Neal H. Walfield <neal@pep.foundation> | 2020-01-10 13:11:45 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2020-01-10 13:56:11 +0100 |
commit | 71fc2c6afbcbf4cc4e060dd59300e8065e699323 (patch) | |
tree | c1b4ae762fcea2a137bb8c585d9e47bc86402357 /tool/src/commands/mod.rs | |
parent | b64d45cf84cb7baee3a88a12f1cbf52ad3fb74d3 (diff) |
openpgp: Pass MessageStructure by value, not reference.
- Instead of passing MessageStructure to VerificationHelper::check
by reference, pass it by value.
- After calling VerificationHelper::check, it is dropped. Passing
it by value allows the caller to avoid some cloning.
Diffstat (limited to 'tool/src/commands/mod.rs')
-rw-r--r-- | tool/src/commands/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/src/commands/mod.rs b/tool/src/commands/mod.rs index 12ca6c6a..25b94198 100644 --- a/tool/src/commands/mod.rs +++ b/tool/src/commands/mod.rs @@ -356,7 +356,7 @@ impl<'a> VerificationHelper for VHelper<'a> { Ok(certs) } - fn check(&mut self, structure: &MessageStructure) -> Result<()> { + fn check(&mut self, structure: MessageStructure) -> Result<()> { for layer in structure.iter() { match layer { MessageLayer::Compression { algo } => |