mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-04 18:45:46 +01:00
Clarify a method name
This commit is contained in:
parent
30eb0e5b5b
commit
5df5eb2db2
@ -215,7 +215,7 @@ pub struct ArroySetVectors {
|
||||
}
|
||||
|
||||
impl ArroySetVectors {
|
||||
fn remaining_bytes<'a>(frame: &'a FrameGrantR<'_>) -> &'a [u8] {
|
||||
fn embeddings_bytes<'a>(frame: &'a FrameGrantR<'_>) -> &'a [u8] {
|
||||
let skip = EntryHeader::variant_size() + mem::size_of::<Self>();
|
||||
&frame[skip..]
|
||||
}
|
||||
@ -227,7 +227,7 @@ impl ArroySetVectors {
|
||||
vec: &'v mut Vec<f32>,
|
||||
) -> &'v [f32] {
|
||||
vec.clear();
|
||||
Self::remaining_bytes(frame).chunks_exact(mem::size_of::<f32>()).for_each(|bytes| {
|
||||
Self::embeddings_bytes(frame).chunks_exact(mem::size_of::<f32>()).for_each(|bytes| {
|
||||
let f = bytes.try_into().map(f32::from_ne_bytes).unwrap();
|
||||
vec.push(f);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user