From 03bfe1d433c08e25d0ecec1c4a1ae9269556695c Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 20 Dec 2023 09:34:53 +1100 Subject: [PATCH] Impove rustdoc on assume_checked_ref Add a newline to separate the body and heading of function rustdoc. --- bitcoin/src/address/mod.rs | 2 ++ 1 file changed, 2 insertions(+) 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