mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 20:15:07 +08:00
Fix codec deserialization
This commit is contained in:
parent
f4569b04ad
commit
77d32d0ee8
@ -14,7 +14,8 @@ impl<'a> heed::BytesDecode<'a> for ScriptLanguageCodec {
|
|||||||
let script = str::from_utf8(s_bytes).ok()?;
|
let script = str::from_utf8(s_bytes).ok()?;
|
||||||
let script_name = Script::from_name(script);
|
let script_name = Script::from_name(script);
|
||||||
let lan = str::from_utf8(l_bytes).ok()?;
|
let lan = str::from_utf8(l_bytes).ok()?;
|
||||||
let lan_name = Language::from_name(lan);
|
// skip '\0' byte between the two strings.
|
||||||
|
let lan_name = Language::from_name(&lan[1..]);
|
||||||
|
|
||||||
Some((script_name, lan_name))
|
Some((script_name, lan_name))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user