Fix misc. warnings from `--document-private-items`
authorElias Rohrer <ero@tnull.de>
Fri, 13 Jan 2023 22:02:41 +0000 (16:02 -0600)
committerElias Rohrer <ero@tnull.de>
Sat, 14 Jan 2023 00:26:09 +0000 (18:26 -0600)
lightning-invoice/src/lib.rs
lightning/src/ln/channel.rs
lightning/src/ln/outbound_payment.rs
lightning/src/ln/peer_handler.rs

index dd0f5c3abe55b026a8d11e76a014388fae06ccd5..c01dfa47ba0b086f8de39691de88df06ce3f2e91 100644 (file)
@@ -806,6 +806,7 @@ impl SignedRawInvoice {
 ///
 /// The following example would extract the first B.
 ///
+/// ```ignore
 /// enum Enum {
 ///    A(u8),
 ///    B(u16)
@@ -814,6 +815,7 @@ impl SignedRawInvoice {
 /// let elements = vec![Enum::A(1), Enum::A(2), Enum::B(3), Enum::A(4)];
 ///
 /// assert_eq!(find_extract!(elements.iter(), Enum::B(x), x), Some(3u16));
+/// ```
 macro_rules! find_extract {
        ($iter:expr, $enm:pat, $enm_var:ident) => {
                find_all_extract!($iter, $enm, $enm_var).next()
@@ -825,6 +827,7 @@ macro_rules! find_extract {
 ///
 /// The following example would extract all A.
 ///
+/// ```ignore
 /// enum Enum {
 ///    A(u8),
 ///    B(u16)
@@ -836,6 +839,7 @@ macro_rules! find_extract {
 ///    find_all_extract!(elements.iter(), Enum::A(x), x).collect::<Vec<u8>>(),
 ///    vec![1u8, 2u8, 4u8]
 /// );
+/// ```
 macro_rules! find_all_extract {
        ($iter:expr, $enm:pat, $enm_var:ident) => {
                $iter.filter_map(|tf| match *tf {
@@ -1276,7 +1280,7 @@ impl Invoice {
                self.signed_invoice.amount_pico_btc().map(|v| v / 10)
        }
 
-       /// Returns the amount if specified in the invoice as pico <currency>.
+       /// Returns the amount if specified in the invoice as pico BTC.
        fn amount_pico_btc(&self) -> Option<u64> {
                self.signed_invoice.amount_pico_btc()
        }
index 76dc15065c05cd298b532247de377b757ce5491f..448fcd7fe3107b508847847c72fd9a3ce2f5c2c9 100644 (file)
@@ -798,7 +798,7 @@ pub const MAX_CHAN_DUST_LIMIT_SATOSHIS: u64 = MAX_STD_OUTPUT_DUST_LIMIT_SATOSHIS
 /// In order to avoid having to concern ourselves with standardness during the closing process, we
 /// simply require our counterparty to use a dust limit which will leave any segwit output
 /// standard.
-/// See https://github.com/lightning/bolts/issues/905 for more details.
+/// See <https://github.com/lightning/bolts/issues/905> for more details.
 pub const MIN_CHAN_DUST_LIMIT_SATOSHIS: u64 = 354;
 
 // Just a reasonable implementation-specific safe lower bound, higher than the dust limit.
index 2f6431665b7ea5ec01bf4a7fe810d0ca9fc1b3c8..44415af3d4d2afd7f8ad125cbf65856a5a535721 100644 (file)
@@ -60,7 +60,7 @@ pub(crate) enum PendingOutboundPayment {
        /// `PaymentPathFailed` events with `all_paths_failed` can be pending at once, confusing a
        /// downstream event handler as to when a payment has actually failed.
        ///
-       /// (1) https://github.com/lightningdevkit/rust-lightning/issues/1164
+       /// (1) <https://github.com/lightningdevkit/rust-lightning/issues/1164>
        Abandoned {
                session_privs: HashSet<[u8; 32]>,
                payment_hash: PaymentHash,
index d851d29d46cd80e9d608fb951bc535e0c231649b..0112a7d314b0481adc03d06915260d0cdda4f0d6 100644 (file)
@@ -644,7 +644,7 @@ impl<Descriptor: SocketDescriptor, RM: Deref, L: Deref> PeerManager<Descriptor,
        }
 }
 
-/// A simple wrapper that optionally prints " from <pubkey>" for an optional pubkey.
+/// A simple wrapper that optionally prints ` from <pubkey>` for an optional pubkey.
 /// This works around `format!()` taking a reference to each argument, preventing
 /// `if let Some(node_id) = peer.their_node_id { format!(.., node_id) } else { .. }` from compiling
 /// due to lifetime errors.
@@ -656,8 +656,8 @@ impl core::fmt::Display for OptionalFromDebugger<'_> {
 }
 
 /// A function used to filter out local or private addresses
-/// https://www.iana.org./assignments/ipv4-address-space/ipv4-address-space.xhtml
-/// https://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xhtml
+/// <https://www.iana.org./assignments/ipv4-address-space/ipv4-address-space.xhtml>
+/// <https://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xhtml>
 fn filter_addresses(ip_address: Option<NetAddress>) -> Option<NetAddress> {
        match ip_address{
                // For IPv4 range 10.0.0.0 - 10.255.255.255 (10/8)