mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 10:07:40 +08:00
Introduce a new bincode internal error
This commit is contained in:
parent
fe5d50969a
commit
7cb8732b45
@ -56,6 +56,8 @@ pub enum InternalError {
|
|||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
SerdeJson(#[from] serde_json::Error),
|
SerdeJson(#[from] serde_json::Error),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
|
BincodeError(#[from] bincode::Error),
|
||||||
|
#[error(transparent)]
|
||||||
Serialization(#[from] SerializationError),
|
Serialization(#[from] SerializationError),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Store(#[from] MdbError),
|
Store(#[from] MdbError),
|
||||||
|
@ -48,8 +48,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
let mut file = tempfile::tempfile()?;
|
let mut file = tempfile::tempfile()?;
|
||||||
/// manage error
|
bincode::serialize_into(&mut file, &rtree).map_err(InternalError::BincodeError)?;
|
||||||
bincode::serialize_into(&mut file, &rtree).unwrap();
|
|
||||||
file.sync_all()?;
|
file.sync_all()?;
|
||||||
|
|
||||||
let rtree_mmap = unsafe { Mmap::map(&file)? };
|
let rtree_mmap = unsafe { Mmap::map(&file)? };
|
||||||
|
Loading…
Reference in New Issue
Block a user