mirror of
				https://github.com/isar/rusqlite.git
				synced 2025-10-31 22:08:55 +08:00 
			
		
		
		
	Fix clippy warnings
This commit is contained in:
		| @@ -463,7 +463,6 @@ tuples_try_from_row!(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P); | ||||
|  | ||||
| #[cfg(test)] | ||||
| mod tests { | ||||
|     #![allow(clippy::redundant_closure)] // false positives due to lifetime issues; clippy issue #5594 | ||||
|     use crate::{Connection, Result}; | ||||
|  | ||||
|     #[test] | ||||
|   | ||||
| @@ -385,9 +385,8 @@ mod test { | ||||
|     } | ||||
|  | ||||
|     #[test] | ||||
|     #[allow(clippy::float_cmp)] | ||||
|     fn test_numeric_conversions() -> Result<()> { | ||||
|         #![allow(clippy::float_cmp)] | ||||
|  | ||||
|         // Test what happens when we store an f32 and retrieve an i32 etc. | ||||
|         let db = Connection::open_in_memory()?; | ||||
|         db.execute_batch("CREATE TABLE foo (x)")?; | ||||
|   | ||||
| @@ -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()); | ||||
|   | ||||
| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user