diff options
Diffstat (limited to 'openpgp/src/cert')
-rw-r--r-- | openpgp/src/cert/amalgamation.rs | 6 | ||||
-rw-r--r-- | openpgp/src/cert/amalgamation/iter.rs | 3 | ||||
-rw-r--r-- | openpgp/src/cert/amalgamation/key.rs | 11 | ||||
-rw-r--r-- | openpgp/src/cert/amalgamation/key/iter.rs | 30 | ||||
-rw-r--r-- | openpgp/src/cert/bindings.rs | 15 | ||||
-rw-r--r-- | openpgp/src/cert/parser/mod.rs | 12 |
6 files changed, 27 insertions, 50 deletions
diff --git a/openpgp/src/cert/amalgamation.rs b/openpgp/src/cert/amalgamation.rs index 883e024a..701a9f8c 100644 --- a/openpgp/src/cert/amalgamation.rs +++ b/openpgp/src/cert/amalgamation.rs @@ -153,7 +153,7 @@ //! code, which doesn't compile: //! //! ```compile_fail -//! # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { +//! # fn main() -> sequoia_openpgp::Result<()> { //! # use sequoia_openpgp as openpgp; //! use openpgp::cert::prelude::*; //! use openpgp::packet::prelude::*; @@ -188,7 +188,7 @@ //! below for the [`ComponentAmalgamation::component`] method: //! //! ``` -//! # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { +//! # fn main() -> sequoia_openpgp::Result<()> { //! # use sequoia_openpgp as openpgp; //! use openpgp::cert::prelude::*; //! use openpgp::packet::prelude::*; @@ -758,7 +758,7 @@ impl<'a, C> ComponentAmalgamation<'a, C> { /// # Examples /// /// ``` - /// # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { + /// # fn main() -> sequoia_openpgp::Result<()> { /// # use sequoia_openpgp as openpgp; /// use openpgp::cert::prelude::*; /// use openpgp::packet::prelude::*; diff --git a/openpgp/src/cert/amalgamation/iter.rs b/openpgp/src/cert/amalgamation/iter.rs index bf940845..9e40abde 100644 --- a/openpgp/src/cert/amalgamation/iter.rs +++ b/openpgp/src/cert/amalgamation/iter.rs @@ -341,8 +341,7 @@ impl<'a, C> ValidComponentAmalgamationIter<'a, C> { /// use openpgp::types::RevocationStatus; /// use sequoia_openpgp::policy::StandardPolicy; /// - /// # fn main() { f().unwrap(); } - /// # fn f() -> Result<()> { + /// # fn main() -> Result<()> { /// let p = &StandardPolicy::new(); /// /// # let (cert, _) = diff --git a/openpgp/src/cert/amalgamation/key.rs b/openpgp/src/cert/amalgamation/key.rs index d06d1840..f8fbaa01 100644 --- a/openpgp/src/cert/amalgamation/key.rs +++ b/openpgp/src/cert/amalgamation/key.rs @@ -45,7 +45,7 @@ //! vice versa even though we support changing a `KeyBundle`'s role: //! //! ``` -//! # f().unwrap(); fn f() -> sequoia_openpgp::Result<()> { +//! # fn main() -> sequoia_openpgp::Result<()> { //! # use std::convert::TryInto; //! # use sequoia_openpgp as openpgp; //! # use openpgp::cert::prelude::*; @@ -89,8 +89,7 @@ //! use openpgp::types::RevocationStatus; //! use sequoia_openpgp::policy::StandardPolicy; //! -//! # fn main() { f().unwrap(); } -//! # fn f() -> Result<()> { +//! # fn main() -> Result<()> { //! # let (cert, _) = //! # CertBuilder::general_purpose(None, Some("alice@example.org")) //! # .generate()?; @@ -148,8 +147,7 @@ //! use openpgp::types::RevocationStatus; //! use sequoia_openpgp::policy::StandardPolicy; //! -//! # fn main() { f().unwrap(); } -//! # fn f() -> Result<()> { +//! # fn main() -> Result<()> { //! let p = &StandardPolicy::new(); //! //! # let (cert, _) = @@ -224,8 +222,7 @@ //! # use openpgp::cert::prelude::*; //! use sequoia_openpgp::policy::StandardPolicy; //! -//! # fn main() { f().unwrap(); } -//! # fn f() -> Result<()> { +//! # fn main() -> Result<()> { //! let p = &StandardPolicy::new(); //! //! # let (cert, _) = diff --git a/openpgp/src/cert/amalgamation/key/iter.rs b/openpgp/src/cert/amalgamation/key/iter.rs index edc98f57..0601c2f0 100644 --- a/openpgp/src/cert/amalgamation/key/iter.rs +++ b/openpgp/src/cert/amalgamation/key/iter.rs @@ -261,8 +261,7 @@ impl<'a, P, R> KeyAmalgamationIter<'a, P, R> /// # use sequoia_openpgp as openpgp; /// # use openpgp::Result; /// # use openpgp::cert::prelude::*; - /// # fn main() { f().unwrap(); } - /// # fn f() -> Result<()> { + /// # fn main() -> Result<()> { /// # let (cert, _) = /// # CertBuilder::general_purpose(None, Some("alice@example.org")) /// # .generate()?; @@ -298,8 +297,7 @@ impl<'a, P, R> KeyAmalgamationIter<'a, P, R> /// # use sequoia_openpgp as openpgp; /// # use openpgp::Result; /// # use openpgp::cert::prelude::*; - /// # fn main() { f().unwrap(); } - /// # fn f() -> Result<()> { + /// # fn main() -> Result<()> { /// # let (cert, _) = /// # CertBuilder::general_purpose(None, Some("alice@example.org")) /// # .generate()?; @@ -342,8 +340,7 @@ impl<'a, P, R> KeyAmalgamationIter<'a, P, R> /// # use sequoia_openpgp as openpgp; /// # use openpgp::Result; /// # use openpgp::cert::prelude::*; - /// # fn main() { f().unwrap(); } - /// # fn f() -> Result<()> { + /// # fn main() -> Result<()> { /// # let (cert, _) = /// # CertBuilder::general_purpose(None, Some("alice@example.org")) /// # .generate()?; @@ -387,8 +384,7 @@ impl<'a, P, R> KeyAmalgamationIter<'a, P, R> /// # use sequoia_openpgp as openpgp; /// # use openpgp::Result; /// # use openpgp::cert::prelude::*; - /// # fn main() { f().unwrap(); } - /// # fn f() -> Result<()> { + /// # fn main() -> Result<()> { /// # let (cert, _) = /// # CertBuilder::general_purpose(None, Some("alice@example.org")) /// # .generate()?; @@ -459,8 +455,7 @@ impl<'a, P, R> KeyAmalgamationIter<'a, P, R> /// # use openpgp::Result; /// # use openpgp::cert::prelude::*; /// # - /// # fn main() { f().unwrap(); } - /// # fn f() -> Result<()> { + /// # fn main() -> Result<()> { /// # let (cert, _) = CertBuilder::new() /// # .add_signing_subkey() /// # .add_certification_subkey() @@ -1298,8 +1293,7 @@ impl<'a, P, R> ValidKeyAmalgamationIter<'a, P, R> /// # use openpgp::cert::prelude::*; /// use openpgp::policy::StandardPolicy; /// - /// # fn main() { f().unwrap(); } - /// # fn f() -> Result<()> { + /// # fn main() -> Result<()> { /// # let (cert, _) = /// # CertBuilder::general_purpose(None, Some("alice@example.org")) /// # .generate()?; @@ -1356,8 +1350,7 @@ impl<'a, P, R> ValidKeyAmalgamationIter<'a, P, R> /// # use openpgp::cert::prelude::*; /// use openpgp::policy::StandardPolicy; /// - /// # fn main() { f().unwrap(); } - /// # fn f() -> Result<()> { + /// # fn main() -> Result<()> { /// let p = &StandardPolicy::new(); /// /// # let (cert, _) = @@ -1403,8 +1396,7 @@ impl<'a, P, R> ValidKeyAmalgamationIter<'a, P, R> /// # use openpgp::cert::prelude::*; /// use openpgp::policy::StandardPolicy; /// - /// # fn main() { f().unwrap(); } - /// # fn f() -> Result<()> { + /// # fn main() -> Result<()> { /// let p = &StandardPolicy::new(); /// /// # let (cert, _) = @@ -1457,8 +1449,7 @@ impl<'a, P, R> ValidKeyAmalgamationIter<'a, P, R> /// # use openpgp::cert::prelude::*; /// use openpgp::policy::StandardPolicy; /// - /// # fn main() { f().unwrap(); } - /// # fn f() -> Result<()> { + /// # fn main() -> Result<()> { /// let p = &StandardPolicy::new(); /// /// # let (cert, _) = @@ -1506,8 +1497,7 @@ impl<'a, P, R> ValidKeyAmalgamationIter<'a, P, R> /// # use openpgp::cert::prelude::*; /// use openpgp::policy::StandardPolicy; /// - /// # fn main() { f().unwrap(); } - /// # fn f() -> Result<()> { + /// # fn main() -> Result<()> { /// let p = &StandardPolicy::new(); /// /// # let (cert, _) = 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") diff --git a/openpgp/src/cert/parser/mod.rs b/openpgp/src/cert/parser/mod.rs index ac7d535c..002f08e3 100644 --- a/openpgp/src/cert/parser/mod.rs +++ b/openpgp/src/cert/parser/mod.rs @@ -432,8 +432,7 @@ impl CertValidator { /// # use openpgp::serialize::Serialize; /// use openpgp::cert::prelude::*; /// -/// # fn main() { f().unwrap(); } -/// # fn f() -> Result<()> { +/// # fn main() -> Result<()> { /// # let (alice, _) = /// # CertBuilder::general_purpose(None, Some("alice@example.org")) /// # .generate()?; @@ -478,8 +477,7 @@ impl CertValidator { /// use openpgp::packet::prelude::*; /// use openpgp::types::DataFormat; /// -/// # fn main() { f().unwrap(); } -/// # fn f() -> Result<()> { +/// # fn main() -> Result<()> { /// let mut lit = Literal::new(DataFormat::Text); /// lit.set_body(b"test".to_vec()); /// @@ -646,8 +644,7 @@ impl<'a> CertParser<'a> { /// use openpgp::cert::prelude::*; /// use openpgp::packet::prelude::*; /// - /// # fn main() { f().unwrap(); } - /// # fn f() -> Result<()> { + /// # fn main() -> Result<()> { /// # let (alice, _) = /// # CertBuilder::general_purpose(None, Some("alice@example.org")) /// # .generate()?; @@ -734,8 +731,7 @@ impl<'a> CertParser<'a> { /// # use openpgp::parse::{Parse, PacketParser}; /// use openpgp::cert::prelude::*; /// - /// # fn main() { f().unwrap(); } - /// # fn f() -> Result<()> { + /// # fn main() -> Result<()> { /// # let ppr = PacketParser::from_bytes(b"")?; /// # let some_keyid = "C2B819056C652598".parse()?; /// for certr in CertParser::from(ppr) |