mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Create and use real error types in the codecs
This commit is contained in:
parent
d32eb11329
commit
548c8247c2
7 changed files with 43 additions and 38 deletions
|
@ -15,6 +15,7 @@ mod str_str_u8_codec;
|
|||
pub use byte_slice_ref::BytesRefCodec;
|
||||
use heed::BoxedError;
|
||||
pub use str_ref::StrRefCodec;
|
||||
use thiserror::Error;
|
||||
|
||||
pub use self::beu16_str_codec::BEU16StrCodec;
|
||||
pub use self::beu32_str_codec::BEU32StrCodec;
|
||||
|
@ -34,3 +35,7 @@ pub trait BytesDecodeOwned {
|
|||
|
||||
fn bytes_decode_owned(bytes: &[u8]) -> Result<Self::DItem, BoxedError>;
|
||||
}
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
#[error("the slice is too short")]
|
||||
pub struct SliceTooShortError;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue