diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-09-10 12:19:44 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-09-10 13:33:02 +0200 |
commit | 7e81d5334673ead921337aeef318d4069877bd47 (patch) | |
tree | 26fecb006ffdbbe11d4afac1b4cfa07e326f90db /guide/src/chapter_02.md | |
parent | ef4c52649f2842a42e17b6d53c077665fcd78842 (diff) |
openpgp: Make 'LiteralWriter::new's arguments optional.
Diffstat (limited to 'guide/src/chapter_02.md')
-rw-r--r-- | guide/src/chapter_02.md | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/guide/src/chapter_02.md b/guide/src/chapter_02.md index e29f412c..43418bca 100644 --- a/guide/src/chapter_02.md +++ b/guide/src/chapter_02.md @@ -69,8 +69,7 @@ fn main() { # None, None)?; # # // Emit a literal data packet. -# let mut literal_writer = LiteralWriter::new( -# encryptor, openpgp::constants::DataFormat::Binary, None, None)?; +# let mut literal_writer = LiteralWriter::new(encryptor, None, None, None)?; # # // Encrypt the data. # literal_writer.write_all(plaintext.as_bytes())?; @@ -213,8 +212,7 @@ fn generate() -> openpgp::Result<openpgp::TPK> { # None, None)?; # # // Emit a literal data packet. -# let mut literal_writer = LiteralWriter::new( -# encryptor, openpgp::constants::DataFormat::Binary, None, None)?; +# let mut literal_writer = LiteralWriter::new(encryptor, None, None, None)?; # # // Encrypt the data. # literal_writer.write_all(plaintext.as_bytes())?; @@ -357,8 +355,7 @@ fn encrypt(sink: &mut Write, plaintext: &str, recipient: &openpgp::TPK) None, None)?; // Emit a literal data packet. - let mut literal_writer = LiteralWriter::new( - encryptor, openpgp::constants::DataFormat::Binary, None, None)?; + let mut literal_writer = LiteralWriter::new(encryptor, None, None, None)?; // Encrypt the data. literal_writer.write_all(plaintext.as_bytes())?; @@ -515,8 +512,7 @@ Decrypted data can be read from this using [`io::Read`]. # None, None)?; # # // Emit a literal data packet. -# let mut literal_writer = LiteralWriter::new( -# encryptor, openpgp::constants::DataFormat::Binary, None, None)?; +# let mut literal_writer = LiteralWriter::new(encryptor, None, None, None)?; # # // Encrypt the data. # literal_writer.write_all(plaintext.as_bytes())?; |