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>
Tue, 23 Jan 2024 19:55:39 +0000 (19:55 +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 9b4e41ae174d7b8a73cb8f64b7918f62a0dbf01b..faf48cdecc4a7756de7f32c95b86098c1721c4b7 100644 (file)
@@ -869,7 +869,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, outbound) = {
                        if target == &self.node_one {
                                (self.two_to_one.as_ref(), &self.node_two, false)