mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-06 04:47:42 +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:
+1
-4
@@ -725,10 +725,7 @@ impl<K: std::cmp::Ord, V> Accumulator<K, V> {
|
||||
let object = objects.peek().expect("This iterator can not be empty as it is checked earlier in the code. This is a logic bug, please report it.");
|
||||
|
||||
// Check if this is a common prefix (requires a passed delimiter and its value in the key)
|
||||
let pfx = match common_prefix(object, query) {
|
||||
Some(p) => p,
|
||||
None => return None,
|
||||
};
|
||||
let pfx = common_prefix(object, query)?;
|
||||
assert!(pfx.starts_with(&query.prefix));
|
||||
|
||||
// Try to register this prefix
|
||||
|
||||
Reference in New Issue
Block a user