chore: Move index related things to the meilidb-core workspace member

This commit is contained in:
Clément Renault
2019-02-24 19:44:24 +01:00
parent 3056b351fa
commit 14790eeae3
44 changed files with 1343 additions and 252 deletions

View File

@ -0,0 +1,16 @@
mod doc_ids;
mod doc_indexes;
mod shared_data;
use std::slice::from_raw_parts;
use std::mem::size_of;
pub use self::doc_ids::DocIds;
pub use self::doc_indexes::{DocIndexes, DocIndexesBuilder};
pub use self::shared_data::SharedData;
unsafe fn into_u8_slice<T: Sized>(slice: &[T]) -> &[u8] {
let ptr = slice.as_ptr() as *const u8;
let len = slice.len() * size_of::<T>();
from_raw_parts(ptr, len)
}