diff --git a/tolstoy/src/metadata.rs b/tolstoy/src/metadata.rs index 8547cbfb..5af54047 100644 --- a/tolstoy/src/metadata.rs +++ b/tolstoy/src/metadata.rs @@ -76,7 +76,7 @@ impl SyncMetadata { pub fn set_remote_head(tx: &rusqlite::Transaction, uuid: &Uuid) -> Result<()> { let uuid_bytes = uuid.as_bytes().to_vec(); let updated = tx.execute("UPDATE tolstoy_metadata SET value = ? WHERE key = ?", - &[&uuid_bytes, &schema::REMOTE_HEAD_KEY])?; + rusqlite::params![&uuid_bytes, &schema::REMOTE_HEAD_KEY])?; if updated != 1 { bail!(TolstoyError::DuplicateMetadata(schema::REMOTE_HEAD_KEY.into())); } diff --git a/tolstoy/src/schema.rs b/tolstoy/src/schema.rs index 066b4181..781ed2c0 100644 --- a/tolstoy/src/schema.rs +++ b/tolstoy/src/schema.rs @@ -42,7 +42,7 @@ pub fn ensure_current_version(tx: &mut rusqlite::Transaction) -> Result<()> { // Initial partition information is what we'd see at bootstrap, and is used during first sync. for (name, start, end, index, allow_excision) in BOOTSTRAP_PARTITIONS.iter() { - tx.execute("INSERT OR IGNORE INTO tolstoy_parts VALUES (?, ?, ?, ?, ?)", &[&name.to_string(), start, end, index, allow_excision])?; + tx.execute("INSERT OR IGNORE INTO tolstoy_parts VALUES (?, ?, ?, ?, ?)", rusqlite::params![&name.to_string(), start, end, index, allow_excision])?; } tx.execute("INSERT OR IGNORE INTO tolstoy_metadata (key, value) VALUES (?, zeroblob(16))", &[&REMOTE_HEAD_KEY])?; diff --git a/tolstoy/src/tx_mapper.rs b/tolstoy/src/tx_mapper.rs index 84a94d46..4788f5b0 100644 --- a/tolstoy/src/tx_mapper.rs +++ b/tolstoy/src/tx_mapper.rs @@ -37,7 +37,7 @@ impl TxMapper { )?; for mapping in mappings.iter() { let uuid_bytes = mapping.remote.as_bytes().to_vec(); - stmt.execute(&[&mapping.local, &uuid_bytes])?; + stmt.execute(rusqlite::params![&mapping.local, &uuid_bytes])?; } Ok(()) } @@ -53,7 +53,7 @@ impl TxMapper { None => { let uuid = Uuid::new_v4(); let uuid_bytes = uuid.as_bytes().to_vec(); - db_tx.execute("INSERT INTO tolstoy_tu (tx, uuid) VALUES (?, ?)", &[&tx, &uuid_bytes])?; + db_tx.execute("INSERT INTO tolstoy_tu (tx, uuid) VALUES (?, ?)", rusqlite::params![&tx, &uuid_bytes])?; return Ok(uuid); } }