summaryrefslogtreecommitdiffstats
path: root/ipc/examples
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-01-10 13:11:45 +0100
committerNeal H. Walfield <neal@pep.foundation>2020-01-10 13:56:11 +0100
commit71fc2c6afbcbf4cc4e060dd59300e8065e699323 (patch)
treec1b4ae762fcea2a137bb8c585d9e47bc86402357 /ipc/examples
parentb64d45cf84cb7baee3a88a12f1cbf52ad3fb74d3 (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 'ipc/examples')
-rw-r--r--ipc/examples/gpg-agent-decrypt.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/examples/gpg-agent-decrypt.rs b/ipc/examples/gpg-agent-decrypt.rs
index e76028ec..fe692689 100644
--- a/ipc/examples/gpg-agent-decrypt.rs
+++ b/ipc/examples/gpg-agent-decrypt.rs
@@ -116,7 +116,7 @@ impl<'a> VerificationHelper for Helper<'a> {
-> failure::Fallible<Vec<openpgp::Cert>> {
Ok(Vec::new()) // Feed the Certs to the verifier here.
}
- fn check(&mut self, structure: &MessageStructure)
+ fn check(&mut self, structure: MessageStructure)
-> failure::Fallible<()> {
use self::VerificationResult::*;
for layer in structure.iter() {