Skip to content

Commit 3a4f903

Browse files
committed
reduce API surface further
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
1 parent c807efd commit 3a4f903

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/delay.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl Delay {
4545
///
4646
/// The returned instance of `Delay` will be bound to the timer specified by
4747
/// the `handle` argument.
48-
pub fn new_handle(at: Instant, handle: TimerHandle) -> Delay {
48+
fn new_handle(at: Instant, handle: TimerHandle) -> Delay {
4949
let inner = match handle.inner.upgrade() {
5050
Some(i) => i,
5151
None => {

src/timer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static HANDLE_FALLBACK: AtomicUsize = AtomicUsize::new(0);
220220

221221
/// Error returned from `TimerHandle::set_fallback`.
222222
#[derive(Clone, Debug)]
223-
pub struct SetDefaultError(());
223+
struct SetDefaultError(());
224224

225225
impl TimerHandle {
226226
/// Configures this timer handle to be the one returned by
@@ -245,7 +245,7 @@ impl TimerHandle {
245245
/// thread otherwise loses a race to call this method then it will fail
246246
/// returning an error. Once a call to `set_as_global_fallback` is
247247
/// successful then no future calls may succeed.
248-
pub fn set_as_global_fallback(self) -> Result<(), SetDefaultError> {
248+
fn set_as_global_fallback(self) -> Result<(), SetDefaultError> {
249249
unsafe {
250250
let val = self.into_usize();
251251
match HANDLE_FALLBACK.compare_exchange(0, val, SeqCst, SeqCst) {

0 commit comments

Comments
 (0)