Replace LruCache by VecDeque.

This commit is contained in:
Gwenael Treguier
2015-12-17 20:02:49 +01:00
parent ff02213b53
commit 109c26fea4
3 changed files with 26 additions and 39 deletions

View File

@@ -937,11 +937,10 @@ impl<'conn> Statement<'conn> {
}
#[cfg(feature = "cache")]
fn sql(&self) -> String {
fn eq(&self, sql: &str) -> bool {
unsafe {
let c_slice = CStr::from_ptr(ffi::sqlite3_sql(self.stmt)).to_bytes();
let utf8_str = str::from_utf8(c_slice);
utf8_str.unwrap().to_string()
str::from_utf8(c_slice).unwrap().eq(sql)
}
}