Fix clippy warnings

This commit is contained in:
gwenn
2024-03-15 19:23:36 +01:00
parent 30a211056e
commit 5d148358d6
5 changed files with 7 additions and 9 deletions

View File

@@ -115,7 +115,7 @@ unsafe impl<'vtab> VTab<'vtab> for CsvTab {
if !Path::new(value).exists() {
return Err(Error::ModuleError(format!("file '{value}' does not exist")));
}
vtab.filename = value.to_owned();
value.clone_into(&mut vtab.filename);
}
"schema" => {
schema = Some(value.to_owned());

View File

@@ -1080,12 +1080,12 @@ where
}
}
unsafe extern "C" fn rust_open<'vtab, T: 'vtab>(
unsafe extern "C" fn rust_open<'vtab, T>(
vtab: *mut ffi::sqlite3_vtab,
pp_cursor: *mut *mut ffi::sqlite3_vtab_cursor,
) -> c_int
where
T: VTab<'vtab>,
T: VTab<'vtab> + 'vtab,
{
let vt = vtab.cast::<T>();
match (*vt).open() {
@@ -1186,14 +1186,14 @@ where
}
}
unsafe extern "C" fn rust_update<'vtab, T: 'vtab>(
unsafe extern "C" fn rust_update<'vtab, T>(
vtab: *mut ffi::sqlite3_vtab,
argc: c_int,
argv: *mut *mut ffi::sqlite3_value,
p_rowid: *mut ffi::sqlite3_int64,
) -> c_int
where
T: UpdateVTab<'vtab>,
T: UpdateVTab<'vtab> + 'vtab,
{
assert!(argc >= 1);
let args = slice::from_raw_parts_mut(argv, argc as usize);