diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-12-14 15:52:33 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-12-14 15:52:33 +0100 |
commit | 2ea514aa99f93e12e72fe6742c0f9cccf29cda95 (patch) | |
tree | 2125ee0f19490d04044b1a1ce8732b52655e6e99 | |
parent | 7de4521cb6b65d86cffecd1461344cecd0a7f4e0 (diff) |
openpgp: Drop the doc-hack in favor of doc(inline).
-rw-r--r-- | openpgp/src/cert.rs | 12 | ||||
-rw-r--r-- | openpgp/src/lib.rs | 3 | ||||
-rw-r--r-- | openpgp/src/message/mod.rs | 8 | ||||
-rw-r--r-- | openpgp/src/packet/mod.rs | 6 |
4 files changed, 4 insertions, 25 deletions
diff --git a/openpgp/src/cert.rs b/openpgp/src/cert.rs index 2f091c2a..fc548cd2 100644 --- a/openpgp/src/cert.rs +++ b/openpgp/src/cert.rs @@ -489,11 +489,6 @@ pub trait Preferences<'a>: seal::Sealed { fn features(&self) -> Option<Features>; } -// DOC-HACK: To avoid having a top-level re-export of `Cert`, we move -// it in a submodule `def`. -pub use def::Cert; -mod def { -use super::*; /// A collection of components and their associated signatures. /// /// The `Cert` data structure mirrors the [TPK and TSK data @@ -707,25 +702,18 @@ use super::*; /// ``` #[derive(Debug, Clone, PartialEq)] pub struct Cert { - pub(super) // doc-hack, see above primary: PrimaryKeyBundle<key::PublicParts>, - pub(super) // doc-hack, see above userids: UserIDBundles, - pub(super) // doc-hack, see above user_attributes: UserAttributeBundles, - pub(super) // doc-hack, see above subkeys: SubkeyBundles<key::PublicParts>, // Unknown components, e.g., some UserAttribute++ packet from the // future. - pub(super) // doc-hack, see above unknowns: UnknownBundles, // Signatures that we couldn't find a place for. - pub(super) // doc-hack, see above bad: Vec<packet::Signature>, } -} // doc-hack, see above assert_send_and_sync!(Cert); impl std::str::FromStr for Cert { diff --git a/openpgp/src/lib.rs b/openpgp/src/lib.rs index 65612ce8..c1005dc1 100644 --- a/openpgp/src/lib.rs +++ b/openpgp/src/lib.rs @@ -126,18 +126,21 @@ pub mod fmt; pub mod crypto; pub mod packet; +#[doc(inline)] pub use packet::Packet; use crate::packet::key; pub mod parse; pub mod cert; +#[doc(inline)] pub use cert::Cert; pub mod serialize; mod packet_pile; pub use packet_pile::PacketPile; pub mod message; +#[doc(inline)] pub use message::Message; pub mod types; diff --git a/openpgp/src/message/mod.rs b/openpgp/src/message/mod.rs index 8442cb6d..bee24f0a 100644 --- a/openpgp/src/message/mod.rs +++ b/openpgp/src/message/mod.rs @@ -293,11 +293,6 @@ impl MessageValidator { } } -// DOC-HACK: To avoid having a top-level re-export of `Cert`, we move -// it in a submodule `def`. -pub use def::Message; -mod def { -use super::*; /// A message. /// /// An OpenPGP message is a structured sequence of OpenPGP packets. @@ -344,9 +339,8 @@ use super::*; #[derive(PartialEq)] pub struct Message { /// A message is just a validated packet pile. - pub(super) pile: PacketPile, + pile: PacketPile, } -} // doc-hack, see above assert_send_and_sync!(Message); impl fmt::Debug for Message { diff --git a/openpgp/src/packet/mod.rs b/openpgp/src/packet/mod.rs index d426cc35..3b544de2 100644 --- a/openpgp/src/packet/mod.rs +++ b/openpgp/src/packet/mod.rs @@ -212,11 +212,6 @@ mod mdc; pub use self::mdc::MDC; pub mod aed; -// DOC-HACK: To avoid having a top-level re-export of `Cert`, we move -// it in a submodule `def`. -pub use def::Packet; -mod def { -use super::*; /// Enumeration of packet types. /// /// The different OpenPGP packets are detailed in [Section 5 of RFC 4880]. @@ -283,7 +278,6 @@ pub enum Packet { /// AEAD Encrypted Data Packet. AED(AED), } -} // doc-hack, see above assert_send_and_sync!(Packet); macro_rules! impl_into_iterator { |