1315: fix armv7 r=MarinPostma a=MarinPostma

fix armv7 build

this was caused by usize being 32 bit on armv7 and 64bits on all other targeted architectures.


Co-authored-by: Marin Postma <postma.marin@protonmail.com>
This commit is contained in:
bors[bot] 2021-03-29 17:20:50 +00:00 committed by GitHub
commit 7807a8dcff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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))
}
}