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),
}
/// 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 {