mirror of
https://github.com/isar/rusqlite.git
synced 2025-02-17 05:18:13 +08:00
Fix clippy warnings
This commit is contained in:
parent
6ef0b1d64c
commit
8c6f585d52
@ -279,7 +279,7 @@ pub trait Aggregate<A, T>
|
||||
{
|
||||
/// 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
|
||||
|
@ -247,7 +247,7 @@ impl<'a> Iterator for ValueIter<'a> {
|
||||
type Item = ValueRef<'a>;
|
||||
|
||||
fn next(&mut self) -> Option<ValueRef<'a>> {
|
||||
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<usize>) {
|
||||
@ -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::<Vec<_>>();
|
||||
match $vtab::connect(db, aux, &vec[..]) {
|
||||
Ok(vtab) => {
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user