Clippy code cleanup

This commit is contained in:
2026-08-15 13:22:59 +03:00
parent 9917702c4c
commit e676898135
22 changed files with 290 additions and 171 deletions
+5 -6
View File
@@ -4,14 +4,13 @@ pub fn get_setting(key: String, connection: &Connection) -> Option<String> {
let mut stmt = connection
.prepare("SELECT value FROM settings WHERE id = ?1")
.unwrap();
let iter = stmt.query_map((key,), |row| row.get(0)).unwrap();
let mut iter = stmt.query_map((key,), |row| row.get(0)).unwrap();
for row in iter {
if let Ok(value) = row {
return Some(value);
}
return None;
if let Some(row) = iter.next() && let Ok(value) = row
{
return Some(value);
}
None
}