Replace lru-cache with hashlink

This commit is contained in:
Thom Chiovoloni 2020-10-05 12:38:40 -07:00
parent 587fdeb185
commit 084d1f535d
2 changed files with 3 additions and 3 deletions

View File

@ -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 }

View File

@ -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<LruCache<Arc<str>, RawStatement>>);
/// Cacheable statement.