diff --git a/src/functions.rs b/src/functions.rs index bf32399..eb1315a 100644 --- a/src/functions.rs +++ b/src/functions.rs @@ -279,7 +279,7 @@ pub trait Aggregate { /// Initializes the aggregation context. Will be called prior to the first call /// to `step()` to set up the context for an invocation of the function. (Note: - /// `init()` will not be called if the there are no rows.) + /// `init()` will not be called if there are no rows.) fn init(&self) -> A; /// "step" function called once for each row in an aggregate group. May be called diff --git a/src/vtab/mod.rs b/src/vtab/mod.rs index c4ae7b3..b8385ec 100644 --- a/src/vtab/mod.rs +++ b/src/vtab/mod.rs @@ -247,7 +247,7 @@ impl<'a> Iterator for ValueIter<'a> { type Item = ValueRef<'a>; fn next(&mut self) -> Option> { - self.iter.next().map(|raw| { unsafe { ValueRef::from_value(*raw) } }) + self.iter.next().map(|&raw| { unsafe { ValueRef::from_value(raw) } }) } fn size_hint(&self) -> (usize, Option) { @@ -372,8 +372,8 @@ unsafe extern "C" fn $connect(db: *mut ffi::sqlite3, use std::slice; use vtab::mprintf; let args = slice::from_raw_parts(argv, argc as usize); - let vec = args.iter().map(|cs| { - CStr::from_ptr(*cs).to_bytes() + let vec = args.iter().map(|&cs| { + CStr::from_ptr(cs).to_bytes() }).collect::>(); match $vtab::connect(db, aux, &vec[..]) { Ok(vtab) => { diff --git a/src/vtab/series.rs b/src/vtab/series.rs index 9dd526b..d21755a 100644 --- a/src/vtab/series.rs +++ b/src/vtab/series.rs @@ -13,7 +13,6 @@ pub fn load_module(conn: &Connection) -> Result<()> { conn.create_module("generate_series", &SERIES_MODULE, aux) } - init_module!(SERIES_MODULE, SeriesTab, SeriesTabCursor,