Skip to content

Commit 21000e5

Browse files
committed
fix: remove redundant borrows in format! arguments
- remove unnecessary & before key.to_string() in format! macros in pg.rs and sqlite.rs Signed-off-by: Klara Necasova <knecasov@redhat.com>
1 parent 280ddd4 commit 21000e5

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

store/src/pg.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ where
259259
.map_err(|e| {
260260
StoreError::Database(format!(
261261
"Unable to update OV (guid {}) to2 with value {val}: {e:?}",
262-
&key.to_string()
262+
key.to_string()
263263
))
264264
})
265265
}
@@ -276,7 +276,7 @@ where
276276
.map_err(|e| {
277277
StoreError::Database(format!(
278278
"Unable to update OV (guid {}) to0 with value {val}: {e:?}",
279-
&key.to_string()
279+
key.to_string()
280280
))
281281
})
282282
}
@@ -392,7 +392,7 @@ where
392392
fdo_db::postgres::PostgresOwnerDB::delete_ov(&key.to_string(), conn).map_err(|e| {
393393
StoreError::Database(format!(
394394
"Error deleting OV with guid {}: {e:?}",
395-
&key.to_string()
395+
key.to_string()
396396
))
397397
})
398398
}
@@ -524,7 +524,7 @@ where
524524
.map_err(|e| {
525525
StoreError::Database(format!(
526526
"Error inserting StoredItem with guid {}: {e:?}",
527-
&key.to_string()
527+
key.to_string()
528528
))
529529
})
530530
}

store/src/sqlite.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ where
257257
.map_err(|e| {
258258
StoreError::Database(format!(
259259
"Unable to update OV (guid {}) to2 with value {val}: {e:?}",
260-
&key.to_string()
260+
key.to_string()
261261
))
262262
})
263263
}
@@ -274,7 +274,7 @@ where
274274
.map_err(|e| {
275275
StoreError::Database(format!(
276276
"Unable to update OV (guid {}) to0 with value {val}: {e:?}",
277-
&key.to_string()
277+
key.to_string()
278278
))
279279
})
280280
}
@@ -386,7 +386,7 @@ where
386386
fdo_db::sqlite::SqliteOwnerDB::delete_ov(&key.to_string(), conn).map_err(|e| {
387387
StoreError::Database(format!(
388388
"Error deleting OV with guid {}: {e:?}",
389-
&key.to_string()
389+
key.to_string()
390390
))
391391
})
392392
}
@@ -518,7 +518,7 @@ where
518518
.map_err(|e| {
519519
StoreError::Database(format!(
520520
"Error inserting StoredItem with guid {}: {e:?}",
521-
&key.to_string()
521+
key.to_string()
522522
))
523523
})
524524
}

0 commit comments

Comments
 (0)