Skip to content

Commit 9996569

Browse files
committed
provide testing hooks
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
1 parent f5ace24 commit 9996569

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/delay.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ impl Delay {
4545
///
4646
/// The returned instance of `Delay` will be bound to the timer specified by
4747
/// the `handle` argument.
48-
fn new_handle(at: Instant, handle: TimerHandle) -> Delay {
48+
#[doc(hidden)]
49+
pub fn new_handle(at: Instant, handle: TimerHandle) -> Delay {
4950
let inner = match handle.inner.upgrade() {
5051
Some(i) => i,
5152
None => {

src/lib.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
//! A general purpose crate for working with timeouts and delays with futures.
22
//!
3-
//! This crate is intended to provide general purpose timeouts and interval
4-
//! streams for working with `futures`.
5-
//!
6-
//! Basic usage of this crate is relatively simple:
3+
//! # Examples
74
//!
85
//! ```no_run
96
//! # #[runtime::main]
@@ -16,8 +13,6 @@
1613
//! println!("waited for 3 secs");
1714
//! # }
1815
//! ```
19-
//!
20-
//! And you're off to the races!
2116
2217
#![deny(missing_docs)]
2318
#![warn(missing_debug_implementations)]
@@ -32,6 +27,9 @@ mod timer;
3227
use arc_list::{ArcList, Node};
3328
use heap::{Heap, Slot};
3429
use heap_timer::HeapTimer;
35-
use timer::{ScheduledTimer, Timer, TimerHandle};
30+
use timer::{ScheduledTimer, TimerHandle};
31+
32+
#[doc(hidden)]
33+
pub use timer::Timer;
3634

3735
pub use self::delay::Delay;

0 commit comments

Comments
 (0)