Merge rust-bitcoin/rust-bitcoin#2320: Remove `AddressInner` from rustdocs
08d2b203a5
Remove rustdoc about attribute (Tobin C. Harding)eea0b697bf
Fix stale docs (Tobin C. Harding) Pull request description: Do two miner docs fixes. - Patch 1: Fixes some stale docs I left in when refactoring the `AddressInner` type. - Patch 2: Uses code comments instead of rustdoc and fixes the issue linked below. Fix: #2315 ACKs for top commit: sanket1729: utACK08d2b203a5
Tree-SHA512: e68276473b451c02e230364d386d5b4b610c8ec73ff30e97e111cd339cc2238b65e08c9a83aac5f9d5d6c2e1dd1ee10fec727dfec3bca3cd7317b7049d689f4a
This commit is contained in:
commit
67793d04c3
|
@ -132,9 +132,8 @@ impl NetworkValidation for NetworkUnchecked {
|
|||
|
||||
/// The inner representation of an address, without the network validation tag.
|
||||
///
|
||||
/// An `Address` is composed of a payload and a network. This struct represents the inner
|
||||
/// representation of an address without the network validation tag, which is used to ensure that
|
||||
/// addresses are used only on the appropriate network.
|
||||
/// This struct represents the inner representation of an address without the network validation
|
||||
/// tag, which is used to ensure that addresses are used only on the appropriate network.
|
||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
enum AddressInner {
|
||||
P2pkh { hash: PubkeyHash, network: NetworkKind },
|
||||
|
@ -319,11 +318,8 @@ impl From<Network> for KnownHrp {
|
|||
/// * [BIP341 - Taproot: SegWit version 1 spending rules](https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki)
|
||||
/// * [BIP350 - Bech32m format for v1+ witness addresses](https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki)
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
///
|
||||
/// The `#[repr(transparent)]` attribute is used to guarantee that the layout of the
|
||||
/// `Address` struct is the same as the layout of the `AddressInner` struct. This attribute is
|
||||
/// an implementation detail and users should not rely on it in their code.
|
||||
///
|
||||
// The `#[repr(transparent)]` attribute is used to guarantee the layout of the `Address` struct. It
|
||||
// is an implementation detail and users should not rely on it in their code.
|
||||
#[repr(transparent)]
|
||||
pub struct Address<V = NetworkChecked>(AddressInner, PhantomData<V>)
|
||||
where
|
||||
|
|
Loading…
Reference in New Issue