enable unnecessary_wraps lint

This commit is contained in:
Charles Hall 2024-05-14 19:22:21 -07:00
parent 86218f4771
commit 4e80dc028e
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
4 changed files with 7 additions and 8 deletions

View file

@ -237,8 +237,7 @@ impl KvTree for SqliteTable {
guard.execute("BEGIN", [])?;
for key in iter {
let old = self.get_with_guard(&guard, &key)?;
let new = crate::utils::increment(old.as_deref())
.expect("utils::increment always returns Some");
let new = crate::utils::increment(old.as_deref());
self.insert_with_guard(&guard, &key, &new)?;
}
guard.execute("COMMIT", [])?;
@ -328,8 +327,7 @@ impl KvTree for SqliteTable {
let old = self.get_with_guard(&guard, key)?;
let new =
crate::utils::increment(old.as_deref()).expect("utils::increment always returns Some");
let new = crate::utils::increment(old.as_deref());
self.insert_with_guard(&guard, key, &new)?;