summaryrefslogtreecommitdiffstats
path: root/openpgp/src/cert/bindings.rs
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2020-12-11 18:05:58 +0100
committerAzul <azul@riseup.net>2020-12-11 18:09:09 +0100
commit9675e949909aef163dea230ad80ee7df1cba1ff8 (patch)
tree6b89dfd3dd98a1393966ddfd4ec79181bb648397 /openpgp/src/cert/bindings.rs
parente3d65e26e284b7a77af9f3b713790f8a98bc417f (diff)
openpgp: Standardize fn main() in doctests.
- Avoid the additional `fn f()`.
Diffstat (limited to 'openpgp/src/cert/bindings.rs')
-rw-r--r--openpgp/src/cert/bindings.rs15
1 files changed, 5 insertions, 10 deletions
diff --git a/openpgp/src/cert/bindings.rs b/openpgp/src/cert/bindings.rs
index 34b99d63..1d1ee3c5 100644
--- a/openpgp/src/cert/bindings.rs
+++ b/openpgp/src/cert/bindings.rs
@@ -37,8 +37,7 @@ impl<P: key::KeyParts> Key<P, key::SubordinateRole> {
///
/// ```
/// # use sequoia_openpgp::{*, packet::prelude::*, types::*, cert::*};
- /// # f().unwrap();
- /// # fn f() -> Result<()> {
+ /// # fn main() -> Result<()> {
/// use sequoia_openpgp::policy::StandardPolicy;
/// let p = &StandardPolicy::new();
///
@@ -99,8 +98,7 @@ impl UserID {
///
/// ```
/// # use sequoia_openpgp::{*, packet::prelude::*, types::*, cert::*};
- /// # f().unwrap();
- /// # fn f() -> Result<()> {
+ /// # fn main() -> Result<()> {
/// // Generate a Cert, and create a keypair from the primary key.
/// let (cert, _) = CertBuilder::new().generate()?;
/// let mut keypair = cert.primary_key().key().clone()
@@ -152,8 +150,7 @@ impl UserID {
///
/// ```
/// # use sequoia_openpgp::{*, packet::prelude::*, types::*, cert::*};
- /// # f().unwrap();
- /// # fn f() -> Result<()> {
+ /// # fn main() -> Result<()> {
/// // Generate a Cert, and create a keypair from the primary key.
/// let (alice, _) = CertBuilder::new()
/// .set_primary_key_flags(KeyFlags::empty().set_certification())
@@ -231,8 +228,7 @@ impl UserAttribute {
/// ```
/// # use sequoia_openpgp::{*, packet::prelude::*, types::*, cert::*,
/// # packet::user_attribute::*};
- /// # f().unwrap();
- /// # fn f() -> Result<()> {
+ /// # fn main() -> Result<()> {
/// // Generate a Cert, and create a keypair from the primary key.
/// let (cert, _) = CertBuilder::new()
/// .generate()?;
@@ -289,8 +285,7 @@ impl UserAttribute {
/// ```
/// # use sequoia_openpgp::{*, packet::prelude::*, types::*, cert::*,
/// # packet::user_attribute::*};
- /// # f().unwrap();
- /// # fn f() -> Result<()> {
+ /// # fn main() -> Result<()> {
/// // Generate a Cert, and create a keypair from the primary key.
/// let (alice, _) = CertBuilder::new()
/// .add_userid("alice@example.org")