mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 01:57:41 +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)]
|
||||
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…
Reference in New Issue
Block a user