From 084d1f535dd2e4ec70143b62eacfad37a3951a83 Mon Sep 17 00:00:00 2001 From: Thom Chiovoloni Date: Mon, 5 Oct 2020 12:38:40 -0700 Subject: [PATCH] Replace lru-cache with hashlink --- Cargo.toml | 2 +- src/cache.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 41368c0..8f6fcd1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -98,7 +98,7 @@ bundled-full = [ [dependencies] time = { version = "0.2", optional = true } bitflags = "1.2" -lru-cache = "0.1" +hashlink = "0.5" chrono = { version = "0.4", optional = true } serde_json = { version = "1.0", optional = true } csv = { version = "1.1", optional = true } diff --git a/src/cache.rs b/src/cache.rs index 67ecd24..7dc9d23 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -2,7 +2,7 @@ use crate::raw_statement::RawStatement; use crate::{Connection, Result, Statement}; -use lru_cache::LruCache; +use hashlink::LruCache; use std::cell::RefCell; use std::ops::{Deref, DerefMut}; use std::sync::Arc; @@ -54,7 +54,7 @@ impl Connection { } /// Prepared statements LRU cache. -#[derive(Debug)] +// #[derive(Debug)] // FIXME: https://github.com/kyren/hashlink/pull/4 pub struct StatementCache(RefCell, RawStatement>>); /// Cacheable statement.