]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Restrict ChannelInfo::as_directed_from visibility
authorJeffrey Czyz <jkczyz@gmail.com>
Tue, 29 Mar 2022 15:20:39 +0000 (10:20 -0500)
committerMatt Corallo <git@bluematt.me>
Mon, 14 Oct 2024 19:15:11 +0000 (19:15 +0000)
Bindings can't handle references in return types, so reduce the
visibility to pub(crate).

lightning/src/routing/gossip.rs

index d41866d2aa1b4b07240072142ffc49823691c8d3..c88252a15cda400254f60a34136978c4dcaa7225 100644 (file)
@@ -972,7 +972,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)> {
                if self.one_to_two.is_none() || self.two_to_one.is_none() { return None; }
                let (direction, target, outbound) = {
                        if source == &self.node_one {