]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Make `as_directed_to` non-public
authorMatt Corallo <git@bluematt.me>
Tue, 1 Mar 2022 03:46:52 +0000 (03:46 +0000)
committerJeffrey Czyz <jkczyz@gmail.com>
Sun, 3 Apr 2022 21:42:02 +0000 (16:42 -0500)
...as the bindings generation does not currently have the ability
to map a reference to a `NodeId` inside a tuple.

lightning/src/routing/network_graph.rs

index 282c87051dd48f2c3b3a82db778cc20a78f7e2c5..dc7b8dc52da2416dc5196cf18f5f0797162685b8 100644 (file)
@@ -685,7 +685,7 @@ pub struct 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)> {
                let (direction, source) = {
                        if target == &self.node_one {
                                (self.two_to_one.as_ref(), &self.node_two)