diff --git a/benches/lib.rs b/benches/lib.rs index fb03d09..421e0ec 100644 --- a/benches/lib.rs +++ b/benches/lib.rs @@ -1,3 +1,4 @@ +#![feature(extern_crate_item_prelude)] #![feature(test)] extern crate test; diff --git a/src/lib.rs b/src/lib.rs index 3448f87..856a2a3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -147,7 +147,7 @@ pub mod vtab; // Number of cached prepared statements we'll hold on to. const STATEMENT_CACHE_DEFAULT_CAPACITY: usize = 16; /// To be used when your statement has no [parameter](https://sqlite.org/lang_expr.html#varparam). -pub const NO_PARAMS: &'static [&'static ToSql] = &[]; +pub const NO_PARAMS: &[&ToSql] = &[]; /// Old name for `Result`. `SqliteResult` is deprecated. #[deprecated(since = "0.6.0", note = "Use Result instead")] diff --git a/src/statement.rs b/src/statement.rs index f1c7765..5217ce4 100644 --- a/src/statement.rs +++ b/src/statement.rs @@ -367,12 +367,7 @@ impl<'conn> Statement<'conn> { P::Item: ToSql, { let mut rows = try!(self.query(params)); - let exists = { - match rows.next() { - Some(_) => true, - None => false, - } - }; + let exists = rows.next().is_some(); Ok(exists) } diff --git a/src/vtab/mod.rs b/src/vtab/mod.rs index a219198..4b2fb08 100644 --- a/src/vtab/mod.rs +++ b/src/vtab/mod.rs @@ -467,7 +467,9 @@ impl<'a> Values<'a> { Error::FromSqlConversionFailure(idx, value.data_type(), err) } FromSqlError::OutOfRange(i) => Error::IntegralValueOutOfRange(idx, i), - }) + #[cfg(feature = "i128_blob")] + FromSqlError::InvalidI128Size(_) => Error::InvalidColumnType(idx, value.data_type()), + }) } // `sqlite3_value_type` returns `SQLITE_NULL` for pointer.