Skip to content

Commit e2f232a

Browse files
committed
Fix misc. warnings from --document-private-items
1 parent d91db61 commit e2f232a

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

lightning-invoice/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@ impl SignedRawInvoice {
806806
///
807807
/// The following example would extract the first B.
808808
///
809+
/// ```
809810
/// enum Enum {
810811
/// A(u8),
811812
/// B(u16)
@@ -814,6 +815,7 @@ impl SignedRawInvoice {
814815
/// let elements = vec![Enum::A(1), Enum::A(2), Enum::B(3), Enum::A(4)];
815816
///
816817
/// assert_eq!(find_extract!(elements.iter(), Enum::B(x), x), Some(3u16));
818+
/// ```
817819
macro_rules! find_extract {
818820
($iter:expr, $enm:pat, $enm_var:ident) => {
819821
find_all_extract!($iter, $enm, $enm_var).next()
@@ -825,6 +827,7 @@ macro_rules! find_extract {
825827
///
826828
/// The following example would extract all A.
827829
///
830+
/// ```
828831
/// enum Enum {
829832
/// A(u8),
830833
/// B(u16)
@@ -836,6 +839,7 @@ macro_rules! find_extract {
836839
/// find_all_extract!(elements.iter(), Enum::A(x), x).collect::<Vec<u8>>(),
837840
/// vec![1u8, 2u8, 4u8]
838841
/// );
842+
/// ```
839843
macro_rules! find_all_extract {
840844
($iter:expr, $enm:pat, $enm_var:ident) => {
841845
$iter.filter_map(|tf| match *tf {
@@ -1276,7 +1280,7 @@ impl Invoice {
12761280
self.signed_invoice.amount_pico_btc().map(|v| v / 10)
12771281
}
12781282

1279-
/// Returns the amount if specified in the invoice as pico <currency>.
1283+
/// Returns the amount if specified in the invoice as pico BTC.
12801284
fn amount_pico_btc(&self) -> Option<u64> {
12811285
self.signed_invoice.amount_pico_btc()
12821286
}

lightning/src/ln/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ pub const MAX_CHAN_DUST_LIMIT_SATOSHIS: u64 = MAX_STD_OUTPUT_DUST_LIMIT_SATOSHIS
798798
/// In order to avoid having to concern ourselves with standardness during the closing process, we
799799
/// simply require our counterparty to use a dust limit which will leave any segwit output
800800
/// standard.
801-
/// See https://github.com/lightning/bolts/issues/905 for more details.
801+
/// See <https://github.com/lightning/bolts/issues/905> for more details.
802802
pub const MIN_CHAN_DUST_LIMIT_SATOSHIS: u64 = 354;
803803

804804
// Just a reasonable implementation-specific safe lower bound, higher than the dust limit.

lightning/src/ln/outbound_payment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub(crate) enum PendingOutboundPayment {
6060
/// `PaymentPathFailed` events with `all_paths_failed` can be pending at once, confusing a
6161
/// downstream event handler as to when a payment has actually failed.
6262
///
63-
/// (1) https://github.com/lightningdevkit/rust-lightning/issues/1164
63+
/// (1) <https://github.com/lightningdevkit/rust-lightning/issues/1164>
6464
Abandoned {
6565
session_privs: HashSet<[u8; 32]>,
6666
payment_hash: PaymentHash,

lightning/src/ln/peer_handler.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ impl<Descriptor: SocketDescriptor, RM: Deref, L: Deref> PeerManager<Descriptor,
644644
}
645645
}
646646

647-
/// A simple wrapper that optionally prints " from <pubkey>" for an optional pubkey.
647+
/// A simple wrapper that optionally prints ` from <pubkey>` for an optional pubkey.
648648
/// This works around `format!()` taking a reference to each argument, preventing
649649
/// `if let Some(node_id) = peer.their_node_id { format!(.., node_id) } else { .. }` from compiling
650650
/// due to lifetime errors.
@@ -656,8 +656,8 @@ impl core::fmt::Display for OptionalFromDebugger<'_> {
656656
}
657657

658658
/// A function used to filter out local or private addresses
659-
/// https://www.iana.org./assignments/ipv4-address-space/ipv4-address-space.xhtml
660-
/// https://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xhtml
659+
/// <https://www.iana.org./assignments/ipv4-address-space/ipv4-address-space.xhtml>
660+
/// <https://www.iana.org/assignments/ipv6-address-space/ipv6-address-space.xhtml>
661661
fn filter_addresses(ip_address: Option<NetAddress>) -> Option<NetAddress> {
662662
match ip_address{
663663
// For IPv4 range 10.0.0.0 - 10.255.255.255 (10/8)

0 commit comments

Comments
 (0)