Skip to content

Commit 9f620d7

Browse files
committed
delay -> dur
1 parent 06d1bd8 commit 9f620d7

File tree

6 files changed

+39
-3
lines changed

6 files changed

+39
-3
lines changed

.idea/.gitignore

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/futures-timer.iml

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/delay.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ impl Delay {
6969
/// specified by `at`.
7070
#[inline]
7171
pub fn reset(&mut self, dur: Duration) {
72-
if self._reset(delay).is_err() {
72+
if self._reset(dur).is_err() {
7373
self.state = None
7474
}
7575
}
7676

77-
fn _reset(&mut self, delay: Duration) -> Result<(), ()> {
77+
fn _reset(&mut self, dur: Duration) -> Result<(), ()> {
7878
let state = match self.state {
7979
Some(ref state) => state,
8080
None => return Err(()),
@@ -92,7 +92,7 @@ impl Delay {
9292
Err(s) => bits = s,
9393
}
9494
}
95-
*state.at.lock().unwrap() = Some(Instant::now() + delay);
95+
*state.at.lock().unwrap() = Some(Instant::now() + dur);
9696
// If we fail to push our node then we've become an inert timer, so
9797
// we'll want to clear our `state` field accordingly
9898
timeouts.list.push(state)?;

0 commit comments

Comments
 (0)