From: Jeffrey Czyz Date: Tue, 29 Mar 2022 15:20:39 +0000 (-0500) Subject: Restrict ChannelInfo::as_directed_from visibility X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=1f7845da9d9e1da470dce73efa614c53762a3d63;p=rust-lightning Restrict ChannelInfo::as_directed_from visibility Bindings can't handle references in return types, so reduce the visibility to pub(crate). --- diff --git a/lightning/src/routing/gossip.rs b/lightning/src/routing/gossip.rs index c700fb0e4..0160e2054 100644 --- a/lightning/src/routing/gossip.rs +++ b/lightning/src/routing/gossip.rs @@ -752,7 +752,7 @@ impl ChannelInfo { /// Returns a [`DirectedChannelInfo`] for the channel directed from the given `source` to a /// returned `target`, or `None` if `source` is not one of the channel's counterparties. - pub fn as_directed_from(&self, source: &NodeId) -> Option<(DirectedChannelInfo, &NodeId)> { + pub(crate) fn as_directed_from(&self, source: &NodeId) -> Option<(DirectedChannelInfo, &NodeId)> { let (direction, target) = { if source == &self.node_one { (self.one_to_two.as_ref(), &self.node_two)