diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-05-13 13:46:41 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-05-13 16:04:03 +0200 |
commit | 3928cd36f63869fc37c78d991d38d13badcb4e80 (patch) | |
tree | cc1d543ec948fa48a79c9c99ed570f19364bd45b /tool/src/commands | |
parent | ed092e1bf26f7473c058b0c4524348538d649d2f (diff) |
openpgp: Unawkwardify Encryptor::add_password.
Diffstat (limited to 'tool/src/commands')
-rw-r--r-- | tool/src/commands/mod.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tool/src/commands/mod.rs b/tool/src/commands/mod.rs index e7851f70..32239d8d 100644 --- a/tool/src/commands/mod.rs +++ b/tool/src/commands/mod.rs @@ -120,11 +120,9 @@ pub fn encrypt<'a>(policy: &'a dyn Policy, } // We want to encrypt a literal data packet. - let mut encryptor = - Encryptor::for_recipients(message, recipient_subkeys); - for p in passwords { - encryptor = encryptor.add_password(p); - } + let encryptor = + Encryptor::for_recipients(message, recipient_subkeys) + .add_passwords(passwords); let mut sink = encryptor.build() .context("Failed to create encryptor")?; |