From f2dc3b8355a2606630b3fc925fa13abc981ea67d Mon Sep 17 00:00:00 2001 From: Derek Date: Sat, 10 Aug 2024 16:28:37 -0700 Subject: [PATCH] bump to v1.0.13 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/cache/mod.rs | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fef0b56..b94bdd4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -813,7 +813,7 @@ dependencies = [ [[package]] name = "cached-eth-rpc" -version = "1.0.12" +version = "1.0.13" dependencies = [ "actix-web", "alloy-primitives", diff --git a/Cargo.toml b/Cargo.toml index 3b8e016..4811c86 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cached-eth-rpc" -version = "1.0.12" +version = "1.0.13" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/cache/mod.rs b/src/cache/mod.rs index 4b57150..6bcbfc3 100644 --- a/src/cache/mod.rs +++ b/src/cache/mod.rs @@ -5,8 +5,6 @@ pub mod redis_backend; use chrono::Local; use serde::{Deserialize, Serialize}; use serde_json::Value; -use std::cmp::min; -use tracing::info; pub enum CacheStatus { Cached { key: String, value: CacheValue }, @@ -42,7 +40,7 @@ impl CacheValue { } pub fn effective_ttl(&self) -> u32 { - min(self.reorg_ttl, self.ttl) + std::cmp::min(self.reorg_ttl, self.ttl) } pub fn update(mut self, expired_value: &Option, reorg_ttl: u32) -> Self {