Skip to content

Commit

Permalink
Remove unnecessary empty keyexpr check
Browse files Browse the repository at this point in the history
  • Loading branch information
oteffahi committed Sep 3, 2024
1 parent fefb7d6 commit 0ec13b9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions plugins/zenoh-plugin-storage-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,7 @@ pub fn strip_prefix(

match key_expr.strip_prefix(prefix).as_slice() {
// NOTE: `stripped_key_expr.is_empty()` should be impossible as "" is not a valid key expression
[stripped_key_expr] if !stripped_key_expr.is_empty() => {
OwnedKeyExpr::from_str(stripped_key_expr).map(Some)
}
[stripped_key_expr] => OwnedKeyExpr::from_str(stripped_key_expr).map(Some),
_ => bail!("Failed to strip prefix < {} > from: {}", prefix, key_expr),
}
}
Expand Down

0 comments on commit 0ec13b9

Please sign in to comment.