diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2021-08-24 12:54:16 +0200 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2021-08-27 12:58:07 +0200 |
commit | 83e6668ed4b5692a0a52174031f99c1e76726f77 (patch) | |
tree | 14f455534e38c79df895d8abf9dac424fe3bbce0 | |
parent | e5746684e84377dd8828f6a5a8ab4c0eec73c3ec (diff) |
ffi, openpgp: Cleanup links after cargo intraconv.
- openpgp: Make broken relative links absolute:
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+packet),\1crate::packet,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+cert),\1crate::cert,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+parse),\1crate::parse,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+policy),\1crate::policy,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+serialize),\1crate::serialize,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+armor),\1crate::armor,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+types),\1crate::types,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!] *(\[`PacketPile`\]):).*$,\1 crate::PacketPile,' {} +
- openpgp: Link to PacketParser and Policy structs, not the modules.
- ffi: Make links to sequoia_openpgp and sequoia_net absolute
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+sequoia_openpgp),\1sequoia_openpgp,' {} +
- find -name "*.rs" -exec sed -i -E 's,^( *//[/!](.*): )((super::)+sequoia_net),\1sequoia_net,' {} +
62 files changed, 387 insertions, 408 deletions
diff --git a/openpgp-ffi/src/amalgamation.rs b/openpgp-ffi/src/amalgamation.rs index f351c6ac..697eff79 100644 --- a/openpgp-ffi/src/amalgamation.rs +++ b/openpgp-ffi/src/amalgamation.rs @@ -3,7 +3,7 @@ //! //! Wraps [`sequoia-openpgp::cert::key_amalgamation::KeyAmalgamation`]. //! -//! [`sequoia-openpgp::cert::key_amalgamation::KeyAmalgamation`]: super::super::super::sequoia_openpgp::cert::key_amalgamation::KeyAmalgamation +//! [`sequoia-openpgp::cert::key_amalgamation::KeyAmalgamation`]: sequoia_openpgp::cert::key_amalgamation::KeyAmalgamation use libc::time_t; @@ -32,7 +32,7 @@ type UserIDAmalgamationType<'a> /// /// Wraps [`sequoia-openpgp::cert::amalgamation::ComponentAmalgamation`]. /// -/// [`sequoia-openpgp::cert::amalgamation::ComponentAmalgamation`]: super::super::super::sequoia_openpgp::cert::amalgamation::ComponentAmalgamation +/// [`sequoia-openpgp::cert::amalgamation::ComponentAmalgamation`]: sequoia_openpgp::cert::amalgamation::ComponentAmalgamation #[crate::ffi_wrapper_type(prefix = "pgp_", derive = "Clone, Debug")] pub struct UserIDAmalgamation<'a>(UserIDAmalgamationType<'a>); @@ -56,7 +56,7 @@ type ValidUserIDAmalgamationType<'a> /// /// Wraps [`sequoia-openpgp::cert::amalgamation::ValidComponentAmalgamation`]. /// -/// [`sequoia-openpgp::cert::amalgamation::ValidComponentAmalgamation`]: super::super::super::sequoia_openpgp::cert::amalgamation::ValidComponentAmalgamation +/// [`sequoia-openpgp::cert::amalgamation::ValidComponentAmalgamation`]: sequoia_openpgp::cert::amalgamation::ValidComponentAmalgamation #[crate::ffi_wrapper_type(prefix = "pgp_", derive = "Clone, Debug")] pub struct ValidUserIDAmalgamation<'a>(ValidUserIDAmalgamationType<'a>); diff --git a/openpgp-ffi/src/armor.rs b/openpgp-ffi/src/armor.rs index a1c42a22..469c0e48 100644 --- a/openpgp-ffi/src/armor.rs +++ b/openpgp-ffi/src/armor.rs @@ -2,7 +2,7 @@ //! //! Wraps [`sequoia-openpgp::armor`]. //! -//! [`sequoia-openpgp::armor`]: super::super::super::sequoia_openpgp::armor +//! [`sequoia-openpgp::armor`]: sequoia_openpgp::armor use std::mem::size_of; use std::ptr; diff --git a/openpgp-ffi/src/cert.rs b/openpgp-ffi/src/cert.rs index cf503019..03ca1c7d 100644 --- a/openpgp-ffi/src/cert.rs +++ b/openpgp-ffi/src/cert.rs @@ -2,8 +2,8 @@ //! //! Wraps [`sequoia-openpgp::Cert`] and [related functionality]. //! -//! [`sequoia-openpgp::Cert`]: super::super::super::sequoia_openpgp::cert::Cert -//! [related functionality]: super::super::super::sequoia_openpgp::cert +//! [`sequoia-openpgp::Cert`]: sequoia_openpgp::cert::Cert +//! [related functionality]: sequoia_openpgp::cert use std::convert::TryFrom; use std::ptr; diff --git a/openpgp-ffi/src/crypto.rs b/openpgp-ffi/src/crypto.rs index ffc77c1e..60e7f18c 100644 --- a/openpgp-ffi/src/crypto.rs +++ b/openpgp-ffi/src/crypto.rs @@ -2,7 +2,7 @@ //! //! Wraps [`sequoia-openpgp::crypto`]. //! -//! [`sequoia-openpgp::crypto`]: super::super::super::sequoia_openpgp::crypto +//! [`sequoia-openpgp::crypto`]: sequoia_openpgp::crypto use libc::size_t; diff --git a/openpgp-ffi/src/fingerprint.rs b/openpgp-ffi/src/fingerprint.rs index 6bb7ea80..429b83d9 100644 --- a/openpgp-ffi/src/fingerprint.rs +++ b/openpgp-ffi/src/fingerprint.rs @@ -8,7 +8,7 @@ //! //! Wraps [`sequoia-openpgp::Fingerprint`]. //! -//! [`sequoia-openpgp::Fingerprint`]: super::super::super::sequoia_openpgp::Fingerprint +//! [`sequoia-openpgp::Fingerprint`]: sequoia_openpgp::Fingerprint use std::slice; use libc::{c_char, size_t}; @@ -29,7 +29,7 @@ use crate::RefRaw; /// /// Wraps [`sequoia-openpgp::Fingerprint`]. /// -/// [`sequoia-openpgp::Fingerprint`]: super::super::super::sequoia_openpgp::Fingerprint +/// [`sequoia-openpgp::Fingerprint`]: sequoia_openpgp::Fingerprint #[crate::ffi_wrapper_type(prefix = "pgp_", derive = "Clone, Debug, Display, Hash, PartialEq")] pub struct Fingerprint(openpgp::Fingerprint); diff --git a/openpgp-ffi/src/key_amalgamation.rs b/openpgp-ffi/src/key_amalgamation.rs index 2c9efebb..94ffcb39 100644 --- a/openpgp-ffi/src/key_amalgamation.rs +++ b/openpgp-ffi/src/key_amalgamation.rs @@ -3,7 +3,7 @@ //! //! Wraps [`sequoia-openpgp::cert::key_amalgamation::KeyAmalgamation`]. //! -//! [`sequoia-openpgp::cert::key_amalgamation::KeyAmalgamation`]: super::super::super::sequoia_openpgp::cert::key_amalgamation::KeyAmalgamation +//! [`sequoia-openpgp::cert::key_amalgamation::KeyAmalgamation`]: sequoia_openpgp::cert::key_amalgamation::KeyAmalgamation use std::slice; use libc::{size_t, time_t}; @@ -35,7 +35,7 @@ type ErasedKeyAmalgamation<'a> = /// /// Wraps [`sequoia-openpgp::cert::key_amalgamation::KeyAmalgamation`]. /// -/// [`sequoia-openpgp::cert::key_amalgamation::KeyAmalgamation`]: super::super::super::sequoia_openpgp::cert::key_amalgamation::KeyAmalgamation +/// [`sequoia-openpgp::cert::key_amalgamation::KeyAmalgamation`]: sequoia_openpgp::cert::key_amalgamation::KeyAmalgamation #[crate::ffi_wrapper_type(prefix = "pgp_", derive = "Clone, Debug")] pub struct KeyAmalgamation<'a>(ErasedKeyAmalgamation<'a>); @@ -60,7 +60,7 @@ pub extern "C" fn pgp_key_amalgamation_key<'a>(ka: *const KeyAmalgamation<'a>) /// /// Wraps [`sequoia-openpgp::cert::key_amalgamation::ValidKeyAmalgamation`]. /// -/// [`sequoia-openpgp::cert::key_amalgamation::ValidKeyAmalgamation`]: super::super::super::sequoia_openpgp::cert::key_amalgamation::ValidKeyAmalgamation +/// [`sequoia-openpgp::cert::key_amalgamation::ValidKeyAmalgamation`]: sequoia_openpgp::cert::key_amalgamation::ValidKeyAmalgamation #[crate::ffi_wrapper_type(prefix = "pgp_", derive = "Clone, Debug")] pub struct ValidKeyAmalgamation<'a>(ValidErasedKeyAmalgamation<'a>); diff --git a/openpgp-ffi/src/keyid.rs b/openpgp-ffi/src/keyid.rs index f45555aa..ee07bf10 100644 --- a/openpgp-ffi/src/keyid.rs +++ b/openpgp-ffi/src/keyid.rs @@ -8,7 +8,7 @@ //! //! Wraps [`sequoia-openpgp::KeyID`]. //! -//! [`sequoia-openpgp::KeyID`]: super::super::super::sequoia_openpgp::KeyID +//! [`sequoia-openpgp::KeyID`]: sequoia_openpgp::KeyID use std::slice; use libc::{c_char}; @@ -29,7 +29,7 @@ use crate::MoveIntoRaw; /// /// Wraps [`sequoia-openpgp::KeyID`]. /// -/// [`sequoia-openpgp::KeyID`]: super::super::super::sequoia_openpgp::KeyID +/// [`sequoia-openpgp::KeyID`]: sequoia_openpgp::KeyID #[crate::ffi_wrapper_type(prefix = "pgp_", name = "keyid", derive = "Clone, Debug, Display, Hash, PartialEq")] pub struct KeyID(openpgp::KeyID); diff --git a/openpgp-ffi/src/lib.rs b/openpgp-ffi/src/lib.rs index 2b27d386..b0b2142e 100644 --- a/openpgp-ffi/src/lib.rs +++ b/openpgp-ffi/src/lib.rs @@ -70,7 +70,7 @@ //! closely resembles this crate. //! //! [The Rules]: #the-rules -//! [corresponding Rust crate]: super::sequoia_openpgp +//! [corresponding Rust crate]: sequoia_openpgp //! //! //! # Examples diff --git a/openpgp-ffi/src/packet/key.rs b/openpgp-ffi/src/packet/key.rs index 2a2386c5..9fffc001 100644 --- a/openpgp-ffi/src/packet/key.rs +++ b/openpgp-ffi/src/packet/key.rs @@ -29,7 +29,7 @@ type UnspecifiedKey = /// /// Wraps [`sequoia-openpgp::packet::Key`]. /// -/// [`sequoia-openpgp::packet::key::Key`]: super::super::super::super::sequoia_openpgp::packet::Key +/// [`sequoia-openpgp::packet::key::Key`]: sequoia_openpgp::packet::Key #[crate::ffi_wrapper_type(prefix = "pgp_", derive = "Clone, Debug, PartialEq, Parse")] pub struct Key(UnspecifiedKey); diff --git a/openpgp-ffi/src/packet/literal.rs b/openpgp-ffi/src/packet/literal.rs index 65ddaaa3..7294dee3 100644 --- a/openpgp-ffi/src/packet/literal.rs +++ b/openpgp-ffi/src/packet/literal.rs @@ -26,9 +26,7 @@ use crate::RefRaw; /// /// [Section 5.8 of RFC 4880]: https://tools.ietf.org/html/rfc4880#section-5.8 /// -/// Wraps [`sequoia-openpgp::packet::literal::Literal`]. -/// -/// [`sequoia-openpgp::packet::literal::Literal`]: super::super::super::super::sequoia_openpgp::packet::literal::Literal +/// Wraps [`sequoia-openpgp::packet::Literal`]. #[crate::ffi_wrapper_type(prefix = "pgp_", derive = "Debug, Parse")] pub struct Literal(openpgp::packet::Literal); diff --git a/openpgp-ffi/src/packet/mod.rs b/openpgp-ffi/src/packet/mod.rs index d8727590..4df75d5c 100644 --- a/openpgp-ffi/src/packet/mod.rs +++ b/openpgp-ffi/src/packet/mod.rs @@ -43,7 +43,7 @@ use crate::RefRaw; /// /// Wraps [`sequoia-openpgp::Packet`]. /// -/// [`sequoia-openpgp::Packet`]: super::super::super::sequoia_openpgp::Packet +/// [`sequoia-openpgp::Packet`]: sequoia_openpgp::Packet #[crate::ffi_wrapper_type(prefix = "pgp_", derive = "Clone, Debug, Hash, PartialEq")] pub struct Packet(openpgp::Packet); diff --git a/openpgp-ffi/src/packet/signature.rs b/openpgp-ffi/src/packet/signature.rs index 5705900d..a208cf3d 100644 --- a/openpgp-ffi/src/packet/signature.rs +++ b/openpgp-ffi/src/packet/signature.rs @@ -34,7 +34,7 @@ use crate::RefRaw; /// /// Wraps [`sequoia-openpgp::packet::Signature`]. /// -/// [`sequoia-openpgp::packet::Signature`]: super::super::super::super::sequoia_openpgp::packet::Signature +/// [`sequoia-openpgp::packet::Signature`]: sequoia_openpgp::packet::Signature #[crate::ffi_wrapper_type(prefix = "pgp_", derive = "Clone, Debug, PartialEq, Parse")] pub struct Signature(openpgp::packet::Signature); diff --git a/openpgp-ffi/src/packet/userid.rs b/openpgp-ffi/src/packet/userid.rs index 796e4778..89febc06 100644 --- a/openpgp-ffi/src/packet/userid.rs +++ b/ |