Skip to content

Commit cf0991f

Browse files
committed
f No need for format
1 parent 7d1d0d5 commit cf0991f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/io/sqlite_store.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,23 +138,20 @@ impl KVStore for SqliteStore {
138138

139139
let sql = format!("SELECT key FROM {} WHERE namespace=:namespace", KV_TABLE_NAME);
140140
let mut stmt = locked_conn.prepare(&sql).map_err(|_| {
141-
let msg = format!("Failed to prepare statement");
142-
std::io::Error::new(std::io::ErrorKind::Other, msg)
141+
std::io::Error::new(std::io::ErrorKind::Other, "Failed to prepare statement")
143142
})?;
144143

145144
let mut keys = Vec::new();
146145

147146
let rows_iter = stmt
148147
.query_map(named_params! {":namespace": namespace, }, |row| row.get(0))
149148
.map_err(|_| {
150-
let msg = format!("Failed to retrieve queried rows");
151-
std::io::Error::new(std::io::ErrorKind::Other, msg)
149+
std::io::Error::new(std::io::ErrorKind::Other, "Failed to retrieve queried rows")
152150
})?;
153151

154152
for k in rows_iter {
155153
keys.push(k.map_err(|_| {
156-
let msg = format!("Failed to retrieve queried rows");
157-
std::io::Error::new(std::io::ErrorKind::Other, msg)
154+
std::io::Error::new(std::io::ErrorKind::Other, "Failed to retrieve queried rows")
158155
})?);
159156
}
160157

0 commit comments

Comments
 (0)