mirror of
https://github.com/isar/rusqlite.git
synced 2025-11-01 14:28:55 +08:00
Clippy
This commit is contained in:
@@ -208,13 +208,13 @@ unsafe impl<'vtab> VTab<'vtab> for CsvTab {
|
||||
let mut record = csv::ByteRecord::new();
|
||||
if reader.read_byte_record(&mut record)? {
|
||||
for (i, _) in record.iter().enumerate() {
|
||||
cols.push(format!("c{}", i));
|
||||
cols.push(format!("c{i}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if let Some(n_col) = n_col {
|
||||
for i in 0..n_col {
|
||||
cols.push(format!("c{}", i));
|
||||
cols.push(format!("c{i}"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -499,7 +499,7 @@ impl IndexInfo {
|
||||
if collation.is_null() {
|
||||
return Err(Error::SqliteFailure(
|
||||
ffi::Error::new(ffi::SQLITE_MISUSE),
|
||||
Some(format!("{} is out of range", constraint_idx)),
|
||||
Some(format!("{constraint_idx} is out of range")),
|
||||
));
|
||||
}
|
||||
Ok(unsafe { CStr::from_ptr(collation) }.to_str()?)
|
||||
@@ -924,7 +924,7 @@ pub fn parameter(c_slice: &[u8]) -> Result<(&str, &str)> {
|
||||
return Ok((param, value));
|
||||
}
|
||||
}
|
||||
Err(Error::ModuleError(format!("illegal argument: '{}'", arg)))
|
||||
Err(Error::ModuleError(format!("illegal argument: '{arg}'")))
|
||||
}
|
||||
|
||||
// FIXME copy/paste from function.rs
|
||||
|
||||
@@ -153,7 +153,7 @@ impl<'vtab> CreateVTab<'vtab> for VTabLog {
|
||||
|
||||
impl<'vtab> UpdateVTab<'vtab> for VTabLog {
|
||||
fn delete(&mut self, arg: ValueRef<'_>) -> Result<()> {
|
||||
println!("VTabLog::delete({}, {:?})", self.i_inst, arg);
|
||||
println!("VTabLog::delete({}, {arg:?})", self.i_inst);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ unsafe impl VTabCursor for VTabLogCursor<'_> {
|
||||
self.row_id
|
||||
)
|
||||
} else {
|
||||
format!("{}{}", i, self.row_id)
|
||||
format!("{i}{}", self.row_id)
|
||||
};
|
||||
println!(
|
||||
"VTabLogCursor::column(tab={}, cursor={}, i={}): {}",
|
||||
|
||||
Reference in New Issue
Block a user