mirror of
				https://github.com/isar/rusqlite.git
				synced 2025-10-31 22:08:55 +08:00 
			
		
		
		
	Replace lru-cache with hashlink
This commit is contained in:
		| @@ -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 } | ||||
|   | ||||
| @@ -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. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user