From 8f6819d40cf2be029c8b0ade1a724173e5b9767a Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 11 May 2024 16:12:39 +0000 Subject: [PATCH] Hide `Direction::select_node_id` due to lifetimes --- lightning/src/blinded_path/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightning/src/blinded_path/mod.rs b/lightning/src/blinded_path/mod.rs index 168bc7174..fd1846492 100644 --- a/lightning/src/blinded_path/mod.rs +++ b/lightning/src/blinded_path/mod.rs @@ -185,7 +185,7 @@ impl_writeable!(BlindedHop, { impl Direction { /// Returns the [`NodeId`] from the inputs corresponding to the direction. - pub fn select_node_id(&self, node_a: NodeId, node_b: NodeId) -> NodeId { + pub(crate) fn select_node_id(&self, node_a: NodeId, node_b: NodeId) -> NodeId { match self { Direction::NodeOne => core::cmp::min(node_a, node_b), Direction::NodeTwo => core::cmp::max(node_a, node_b), @@ -193,7 +193,7 @@ impl Direction { } /// Returns the [`PublicKey`] from the inputs corresponding to the direction. - pub fn select_pubkey<'a>(&self, node_a: &'a PublicKey, node_b: &'a PublicKey) -> &'a PublicKey { + pub(crate) fn select_pubkey<'a>(&self, node_a: &'a PublicKey, node_b: &'a PublicKey) -> &'a PublicKey { let (node_one, node_two) = if NodeId::from_pubkey(node_a) < NodeId::from_pubkey(node_b) { (node_a, node_b) } else { -- 2.39.5