summaryrefslogtreecommitdiffstats
path: root/openpgp/examples/wrap-literal.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2018-10-16 13:35:52 +0200
committerJustus Winter <justus@sequoia-pgp.org>2018-10-16 16:24:39 +0200
commit09664cf092f19648c8d2a14ff1b76d418ed0a42f (patch)
tree10e033490a44326f1b3eed6168ab0e92f16500dd /openpgp/examples/wrap-literal.rs
parent28adb38e2b31dcb0f7dfc0101b14f058da2dff4b (diff)
openpgp: Improve examples.
- Fixes #112.
Diffstat (limited to 'openpgp/examples/wrap-literal.rs')
-rw-r--r--openpgp/examples/wrap-literal.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/openpgp/examples/wrap-literal.rs b/openpgp/examples/wrap-literal.rs
index 5d57d118..b7cea74e 100644
--- a/openpgp/examples/wrap-literal.rs
+++ b/openpgp/examples/wrap-literal.rs
@@ -1,5 +1,5 @@
-/// This program demonstrates how to wrap a stream into a literal data
-/// packet.
+/// Wraps a stream of data into a literal data packet using the
+/// openpgp crate, Sequoia's low-level API.
///
/// It is also used to generate test vectors for the armor subsystem.
@@ -30,11 +30,11 @@ fn main() {
None, None)
.expect("Failed to create literal writer");
- // Finally, just copy all the data.
+ // Copy all the data.
io::copy(&mut io::stdin(), &mut literal)
.expect("Failed to sign data");
- // Teardown the stack to ensure all the data is written.
+ // Finally, teardown the stack to ensure all the data is written.
literal.finalize()
.expect("Failed to write data");
}