diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-11-19 17:32:46 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-11-19 17:32:46 +0100 |
commit | 505f45f8077ac92b4ae5fa6cde88a10a3be15af3 (patch) | |
tree | 61146c2790a9f66bfa03ae301dfa1e397cb93c19 /ipc | |
parent | 1ddc1dd61b45b41801c1d1c364cd6789314cb8f3 (diff) |
openpgp: Use the builder pattern for stream::LiteralWriter.
- See #375.
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/examples/gpg-agent-sign.rs | 2 | ||||
-rw-r--r-- | ipc/tests/gpg-agent.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ipc/examples/gpg-agent-sign.rs b/ipc/examples/gpg-agent-sign.rs index c4b3d6c0..923657bd 100644 --- a/ipc/examples/gpg-agent-sign.rs +++ b/ipc/examples/gpg-agent-sign.rs @@ -63,7 +63,7 @@ fn main() { // Then, create a literal writer to wrap the data in a literal // message packet. - let mut literal = LiteralWriter::new(signer, None, None, None) + let mut literal = LiteralWriter::new(signer).build() .expect("Failed to create literal writer"); // Copy all the data. diff --git a/ipc/tests/gpg-agent.rs b/ipc/tests/gpg-agent.rs index dab1fb74..2dd5bb2b 100644 --- a/ipc/tests/gpg-agent.rs +++ b/ipc/tests/gpg-agent.rs @@ -111,7 +111,7 @@ fn sign() { // Emit a literal data packet. let mut literal_writer = LiteralWriter::new( - signer, None, None, None).unwrap(); + signer).build().unwrap(); // Sign the data. literal_writer.write_all(MESSAGE.as_bytes()).unwrap(); @@ -225,7 +225,7 @@ fn decrypt() { // Emit a literal data packet. let mut literal_writer = LiteralWriter::new( - encryptor, None, None, None).unwrap(); + encryptor).build().unwrap(); // Encrypt the data. literal_writer.write_all(MESSAGE.as_bytes()).unwrap(); |