]> 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>
Fri, 1 Jul 2022 17:48:08 +0000 (17:48 +0000)
Bindings can't handle references in return types, so reduce the
visibility to pub(crate).

lightning/src/routing/gossip.rs

index 939ef779191f7687a6505dc3f22d4bbbb1611bb9..27bd239b7e34eb77cd73c6c62b3d482e83e4063e 100644 (file)
@@ -683,7 +683,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)