diff --git a/src/watcher.rs b/src/watcher.rs index 9577a41..9a0c62d 100644 --- a/src/watcher.rs +++ b/src/watcher.rs @@ -31,7 +31,9 @@ impl Watcher { new_txs: vec![], cached_txs: HashMap::new(), cache: Cache::new(30), - interval: time::interval(interval_duration.unwrap_or(time::Duration::from_millis(100))), + interval: time::interval( + interval_duration.unwrap_or_else(|| time::Duration::from_millis(100)), + ), } }