diff --git a/bitcoin/src/address/mod.rs b/bitcoin/src/address/mod.rs index a57ef68a..321b3e2c 100644 --- a/bitcoin/src/address/mod.rs +++ b/bitcoin/src/address/mod.rs @@ -631,10 +631,12 @@ impl Address { /// Methods that can be called only on `Address`. impl Address { /// Returns a reference to the checked address. + /// /// This function is dangerous in case the address is not a valid checked address. pub fn assume_checked_ref(&self) -> &Address { unsafe { &*(self as *const Address as *const Address) } } + /// Parsed addresses do not always have *one* network. The problem is that legacy testnet, /// regtest and signet addresse use the same prefix instead of multiple different ones. When /// parsing, such addresses are always assumed to be testnet addresses (the same is true for