]> 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)
committerJeffrey Czyz <jkczyz@gmail.com>
Sun, 3 Apr 2022 21:42:02 +0000 (16:42 -0500)
Bindings can't handle references in return types, so reduce the
visibility to pub(crate).

lightning/src/routing/network_graph.rs

index dc7b8dc52da2416dc5196cf18f5f0797162685b8..1a658ee264582b7c019e365f1d2b650c0446dbec 100644 (file)
@@ -700,7 +700,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)