mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 21:04:27 +01:00
Clarify an unreachable unwrap
This commit is contained in:
parent
1575456594
commit
7dd1226faf
@ -54,6 +54,7 @@ impl<'a> heed::BytesDecode<'a> for StrBEU16Codec {
|
||||
}
|
||||
|
||||
let (word_plus_nul_byte, bytes) = bytes.split_at(bytes.len() - footer_len);
|
||||
// unwrap: we just checked the footer + 1 above.
|
||||
let (_, word) = word_plus_nul_byte.split_last().unwrap();
|
||||
let word = str::from_utf8(word)?;
|
||||
let pos = bytes.try_into().map(u16::from_be_bytes)?;
|
||||
|
Loading…
Reference in New Issue
Block a user