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() {
|
match path_utf8.chars().last() {
|
||||||
None => Err(Error::BadRequest(format!(
|
None => unreachable!(),
|
||||||
"Path must have at least a character"
|
|
||||||
))),
|
|
||||||
Some('/') => {
|
Some('/') => {
|
||||||
let mut key = String::with_capacity(path_utf8.len() + index.len());
|
let mut key = String::with_capacity(path_utf8.len() + index.len());
|
||||||
key.push_str(&path_utf8[1..]);
|
key.push_str(&path_utf8[1..]);
|
||||||
|
|
Loading…
Reference in a new issue