From 4fe885408b0a248bcc796149227b4b8a589b5e44 Mon Sep 17 00:00:00 2001 From: Marin Postma Date: Mon, 29 Mar 2021 17:19:31 +0200 Subject: [PATCH] fix arm --- meilisearch-core/src/store/facets.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meilisearch-core/src/store/facets.rs b/meilisearch-core/src/store/facets.rs index 1a7579099..6766a8a01 100644 --- a/meilisearch-core/src/store/facets.rs +++ b/meilisearch-core/src/store/facets.rs @@ -48,10 +48,10 @@ impl<'a> BytesDecode<'a> for FacetData { let mut size_buf = [0; LEN]; size_buf.copy_from_slice(bytes.get(0..LEN)?); // decode size of the first item from the bytes - let first_size = usize::from_be_bytes(size_buf); + let first_size = u64::from_be_bytes(size_buf); // decode first and second items - let first_item = Str::bytes_decode(bytes.get(LEN..(LEN + first_size))?)?; - let second_item = CowSet::bytes_decode(bytes.get((LEN + first_size)..)?)?; + let first_item = Str::bytes_decode(bytes.get(LEN..(LEN + first_size as usize))?)?; + let second_item = CowSet::bytes_decode(bytes.get((LEN + first_size as usize)..)?)?; Some((first_item, second_item)) } }