mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-12-22 23:26:35 +00:00
Explicitly set code path unreachable
This commit is contained in:
parent
fad7bc405b
commit
f8a40e8c4f
1 changed files with 1 additions and 3 deletions
|
@ -176,9 +176,7 @@ fn path_to_key<'a>(path: &'a str, index: &str) -> Result<Cow<'a, str>, Error> {
|
|||
}
|
||||
|
||||
match path_utf8.chars().last() {
|
||||
None => Err(Error::BadRequest(format!(
|
||||
"Path must have at least a character"
|
||||
))),
|
||||
None => unreachable!(),
|
||||
Some('/') => {
|
||||
let mut key = String::with_capacity(path_utf8.len() + index.len());
|
||||
key.push_str(&path_utf8[1..]);
|
||||
|
|
Loading…
Reference in a new issue