mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-06 21:03:13 +00:00
style: clean use for question_mark
- remove useless `Ok` enclosing with `?` lint message: enclosing `Ok` and `?` operator are unneeded help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_question_mark - use question mark instead of manual implementation lint message: this `match` expression can be replaced with `?` help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#question_mark
This commit is contained in:
@@ -105,12 +105,11 @@ impl IDb for FjallDb {
|
||||
}
|
||||
|
||||
fn list_trees(&self) -> Result<Vec<String>> {
|
||||
Ok(self
|
||||
.keyspace
|
||||
self.keyspace
|
||||
.list_partitions()
|
||||
.iter()
|
||||
.map(|n| decode_name(n))
|
||||
.collect::<Result<Vec<_>>>()?)
|
||||
.collect::<Result<Vec<_>>>()
|
||||
}
|
||||
|
||||
fn snapshot(&self, base_path: &Path) -> Result<()> {
|
||||
|
||||
@@ -23,7 +23,7 @@ pub use rusqlite;
|
||||
pub(crate) fn open_db(path: &PathBuf, opt: &OpenOpt) -> Result<Db> {
|
||||
info!("Opening Sqlite database at: {}", path.display());
|
||||
let manager = r2d2_sqlite::SqliteConnectionManager::file(path);
|
||||
Ok(SqliteDb::new(manager, opt.fsync)?)
|
||||
SqliteDb::new(manager, opt.fsync)
|
||||
}
|
||||
|
||||
// ----
|
||||
|
||||
Reference in New Issue
Block a user