summaryrefslogtreecommitdiffstats
path: root/openpgp/examples/generate-encrypt-decrypt.rs
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 /openpgp/examples/generate-encrypt-decrypt.rs
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 'openpgp/examples/generate-encrypt-decrypt.rs')
-rw-r--r--openpgp/examples/generate-encrypt-decrypt.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/examples/generate-encrypt-decrypt.rs b/openpgp/examples/generate-encrypt-decrypt.rs
index d431e99c..4d456193 100644
--- a/openpgp/examples/generate-encrypt-decrypt.rs
+++ b/openpgp/examples/generate-encrypt-decrypt.rs
@@ -100,7 +100,7 @@ impl<'a> VerificationHelper for Helper<'a> {
Ok(Vec::new())
}
- fn check(&mut self, _structure: &MessageStructure)
+ fn check(&mut self, _structure: MessageStructure)
-> openpgp::Result<()> {
// Implement your signature verification policy here.
Ok(())