This commit is contained in:
gwenn
2022-10-28 19:02:49 +02:00
parent 3717b6d514
commit 6d509afe49
11 changed files with 49 additions and 49 deletions

View File

@@ -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}"));
}
}

View File

@@ -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

View File

@@ -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={}): {}",