]> 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)
committerMatt Corallo <git@bluematt.me>
Mon, 14 Oct 2024 19:15:11 +0000 (19:15 +0000)
...as the bindings generation does not currently have the ability
to map a reference to a `NodeId` inside a tuple.

lightning/src/routing/gossip.rs

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