Inline format arguments

This feature has been stable since Rust 1.58.0.
This commit is contained in:
link2xt
2023-01-30 08:37:17 +00:00
parent c911f1262a
commit fcf73165ed
58 changed files with 357 additions and 435 deletions

View File

@@ -177,7 +177,7 @@ impl Context {
Ok(None)
} else {
Ok(Some((
format!("{{\"items\":[\n{}\n]}}", serialized),
format!("{{\"items\":[\n{serialized}\n]}}"),
ids.iter()
.map(|x| x.to_string())
.collect::<Vec<String>>()
@@ -200,7 +200,7 @@ impl Context {
pub(crate) async fn delete_sync_ids(&self, ids: String) -> Result<()> {
self.sql
.execute(
&format!("DELETE FROM multi_device_sync WHERE id IN ({});", ids),
&format!("DELETE FROM multi_device_sync WHERE id IN ({ids});"),
paramsv![],
)
.await?;