Impove rustdoc on assume_checked_ref

Add a newline to separate the body and heading of function rustdoc.
This commit is contained in:
Tobin C. Harding 2023-12-20 09:34:53 +11:00
parent 769809f1f2
commit 03bfe1d433
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 2 additions and 0 deletions

View File

@ -631,10 +631,12 @@ impl Address {
/// Methods that can be called only on `Address<NetworkUnchecked>`.
impl Address<NetworkUnchecked> {
/// 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<NetworkUnchecked> 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