diff --git a/Cargo.toml b/Cargo.toml index e4be0b75..07cf76bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mainline" -version = "2.0.0" +version = "2.0.1" authors = ["nuh.dev"] edition = "2018" description = "Simple, robust, BitTorrent's Mainline DHT implementation" diff --git a/src/rpc.rs b/src/rpc.rs index 48ada1a2..c106d868 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -97,7 +97,9 @@ impl Rpc { put_queries: HashMap::new(), closest_nodes: LruCache::new(NonZeroUsize::new(MAX_CACHED_BUCKETS).unwrap()), - last_table_refresh: Instant::now().checked_sub(REFRESH_TABLE_INTERVAL).unwrap_or_else(Instant::now), + last_table_refresh: Instant::now() + .checked_sub(REFRESH_TABLE_INTERVAL) + .unwrap_or_else(Instant::now), last_table_ping: Instant::now(), }) }