diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2019-09-26 11:53:32 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2019-09-27 22:12:11 +0200 |
commit | 424ce126a56660168f8284fa34ae80cb93d74289 (patch) | |
tree | 2c0440c1f3b0d557def5e1a496ee4ede22045a9b /openpgp/examples/generate-encrypt-decrypt.rs | |
parent | a69ec9f9c5097bb8acd1a4fe2144328c9dc4ade7 (diff) |
linting: Clear up bare trait object warnings
Newer Rust compilers requre `dyn` marking trait objects.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'openpgp/examples/generate-encrypt-decrypt.rs')
-rw-r--r-- | openpgp/examples/generate-encrypt-decrypt.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/examples/generate-encrypt-decrypt.rs b/openpgp/examples/generate-encrypt-decrypt.rs index 90640ba3..f24eba1f 100644 --- a/openpgp/examples/generate-encrypt-decrypt.rs +++ b/openpgp/examples/generate-encrypt-decrypt.rs @@ -38,7 +38,7 @@ fn generate() -> openpgp::Result<openpgp::TPK> { } /// Encrypts the given message. -fn encrypt(sink: &mut Write, plaintext: &str, recipient: &openpgp::TPK) +fn encrypt(sink: &mut dyn Write, plaintext: &str, recipient: &openpgp::TPK) -> openpgp::Result<()> { // Build a vector of recipients to hand to Encryptor. let recipients = @@ -72,7 +72,7 @@ fn encrypt(sink: &mut Write, plaintext: &str, recipient: &openpgp::TPK) } /// Decrypts the given message. -fn decrypt(sink: &mut Write, ciphertext: &[u8], recipient: &openpgp::TPK) +fn decrypt(sink: &mut dyn Write, ciphertext: &[u8], recipient: &openpgp::TPK) -> openpgp::Result<()> { // Make a helper that that feeds the recipient's secret key to the // decryptor. |