From: Matt Corallo Date: Tue, 1 Mar 2022 03:46:52 +0000 (+0000) Subject: Make `as_directed_to` non-public X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=dec090902cad7aa103af6f3491c5c3c42d17b214;p=rust-lightning Make `as_directed_to` non-public ...as the bindings generation does not currently have the ability to map a reference to a `NodeId` inside a tuple. --- diff --git a/lightning/src/routing/gossip.rs b/lightning/src/routing/gossip.rs index bb14adefe..d41866d2a 100644 --- a/lightning/src/routing/gossip.rs +++ b/lightning/src/routing/gossip.rs @@ -955,7 +955,7 @@ impl PartialEq for ChannelInfo { impl ChannelInfo { /// Returns a [`DirectedChannelInfo`] for the channel directed to the given `target` from a /// returned `source`, or `None` if `target` is not one of the channel's counterparties. - pub fn as_directed_to(&self, target: &NodeId) -> Option<(DirectedChannelInfo, &NodeId)> { + pub(crate) fn as_directed_to(&self, target: &NodeId) -> Option<(DirectedChannelInfo, &NodeId)> { if self.one_to_two.is_none() || self.two_to_one.is_none() { return None; } let (direction, source, outbound) = { if target == &self.node_one {