Skip to content

Commit

Permalink
fix(core/node): reexport NodeNo (for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
loyd committed Sep 27, 2023
1 parent 04adcdc commit 6aefa23
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions elfo-core/src/node.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
use std::sync::atomic::{AtomicU16, Ordering};

use crate::addr::NodeNo;
#[cfg(feature = "unstable")]
pub use crate::addr::NodeNo;

static NODE_NO: AtomicU16 = AtomicU16::new(0);

/// Returns the current `node_no`.
pub fn node_no() -> Option<NodeNo> {
NodeNo::from_bits(NODE_NO.load(Ordering::Relaxed))
pub fn node_no() -> Option<crate::addr::NodeNo> {
crate::addr::NodeNo::from_bits(NODE_NO.load(Ordering::Relaxed))
}

/// Sets the current `node_no`.
Expand Down

0 comments on commit 6aefa23

Please sign in to comment.