mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-22 12:40:04 +01: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)]
|
||||
SerdeJson(#[from] serde_json::Error),
|
||||
#[error(transparent)]
|
||||
BincodeError(#[from] bincode::Error),
|
||||
#[error(transparent)]
|
||||
Serialization(#[from] SerializationError),
|
||||
#[error(transparent)]
|
||||
Store(#[from] MdbError),
|
||||
|
@ -48,8 +48,7 @@ where
|
||||
}
|
||||
|
||||
let mut file = tempfile::tempfile()?;
|
||||
/// manage error
|
||||
bincode::serialize_into(&mut file, &rtree).unwrap();
|
||||
bincode::serialize_into(&mut file, &rtree).map_err(InternalError::BincodeError)?;
|
||||
file.sync_all()?;
|
||||
|
||||
let rtree_mmap = unsafe { Mmap::map(&file)? };
|
||||
|
Loading…
x
Reference in New Issue
Block a user