style: run clippy fix and fmt (#9965)

This commit is contained in:
Brooooooklyn
2025-02-05 13:48:17 +00:00
parent db1fcf42c9
commit 58aa18afa6
11 changed files with 54 additions and 27 deletions
+7 -7
View File
@@ -84,7 +84,7 @@ impl SqliteDocStorage {
}
// Increment timestamp by 1ms and retry
timestamp = timestamp + chrono::Duration::milliseconds(1);
timestamp += chrono::Duration::milliseconds(1);
tried += 1;
}
}
@@ -102,7 +102,7 @@ impl SqliteDocStorage {
let mut tx = self.pool.begin().await?;
sqlx::query(r#"INSERT INTO updates (doc_id, data, created_at) VALUES ($1, $2, $3);"#)
.bind(&doc_id)
.bind(doc_id)
.bind(update.as_ref())
.bind(timestamp)
.execute(&mut *tx)
@@ -114,7 +114,7 @@ impl SqliteDocStorage {
ON CONFLICT(doc_id)
DO UPDATE SET timestamp=$2;"#,
)
.bind(&doc_id)
.bind(doc_id)
.bind(timestamp)
.execute(&mut *tx)
.await?;
@@ -293,7 +293,7 @@ mod tests {
storage
.set_doc_snapshot(DocRecord {
doc_id: "test".to_string(),
bin: vec![0, 0].into(),
bin: vec![0, 0],
timestamp: Utc::now().naive_utc(),
})
.await
@@ -373,7 +373,7 @@ mod tests {
let snapshot = DocRecord {
doc_id: "test".to_string(),
bin: vec![0, 0].into(),
bin: vec![0, 0],
timestamp: Utc::now().naive_utc(),
};
@@ -391,7 +391,7 @@ mod tests {
let snapshot = DocRecord {
doc_id: "test".to_string(),
bin: vec![0, 0].into(),
bin: vec![0, 0],
timestamp: Utc::now().naive_utc(),
};
@@ -404,7 +404,7 @@ mod tests {
let snapshot = DocRecord {
doc_id: "test".to_string(),
bin: vec![0, 1].into(),
bin: vec![0, 1],
timestamp: DateTime::from_timestamp_millis(Utc::now().timestamp_millis() - 1000)
.unwrap()
.naive_utc(),