summaryrefslogtreecommitdiffstats
path: root/openpgp/examples/generate-encrypt-decrypt.rs
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2019-05-07 11:12:21 +0200
committerNeal H. Walfield <neal@pep.foundation>2019-05-07 12:18:42 +0200
commit381ecfedce31d38d6bd447d85a05f7d9a458c38b (patch)
treefc9b245eb8a46bee88e9bdaac00c7efd91d70cfc /openpgp/examples/generate-encrypt-decrypt.rs
parent4ecdcafbb1a46a39e7fe54c2802c421c2160884d (diff)
openpgp: Rename TPKBuilder::default to TPKBuilder::new
- One would think that TPKBuilder::default would return something filled with useful defaults, but it just returns a nearly empty builder. Rename it to TPKBuilder::new, which is less misleading.
Diffstat (limited to 'openpgp/examples/generate-encrypt-decrypt.rs')
-rw-r--r--openpgp/examples/generate-encrypt-decrypt.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/examples/generate-encrypt-decrypt.rs b/openpgp/examples/generate-encrypt-decrypt.rs
index c19f9eb2..c338f154 100644
--- a/openpgp/examples/generate-encrypt-decrypt.rs
+++ b/openpgp/examples/generate-encrypt-decrypt.rs
@@ -27,7 +27,7 @@ fn main() {
/// Generates an encryption-capable key.
fn generate() -> openpgp::Result<openpgp::TPK> {
- let (tpk, _revocation) = openpgp::tpk::TPKBuilder::default()
+ let (tpk, _revocation) = openpgp::tpk::TPKBuilder::new()
.add_userid("someone@example.org")
.add_encryption_subkey()
.generate()?;