mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Get ride of rust messagepack (rmp)
This commit is contained in:
parent
81bf6d583d
commit
710ab2386c
9 changed files with 45 additions and 76 deletions
|
@ -104,7 +104,7 @@ impl Index {
|
|||
{
|
||||
let bytes = self.documents_fields.document_attribute(reader, document_id, attribute)?;
|
||||
match bytes {
|
||||
Some(bytes) => Ok(Some(rmp_serde::from_read_ref(bytes)?)),
|
||||
Some(bytes) => Ok(Some(serde_json::from_slice(bytes)?)),
|
||||
None => Ok(None),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ impl Updates {
|
|||
) -> MResult<()>
|
||||
{
|
||||
let update_id_bytes = update_id.to_be_bytes();
|
||||
let update = rmp_serde::to_vec_named(&update)?;
|
||||
let update = serde_json::to_vec(&update)?;
|
||||
let blob = Value::Blob(&update);
|
||||
self.updates.put(writer, update_id_bytes, &blob)?;
|
||||
Ok(())
|
||||
|
@ -86,8 +86,7 @@ impl Updates {
|
|||
|
||||
match first_data {
|
||||
Some(Value::Blob(bytes)) => {
|
||||
let update = rmp_serde::from_read_ref(&bytes)?;
|
||||
|
||||
let update = serde_json::from_slice(&bytes)?;
|
||||
// remove it from the database now
|
||||
let first_id_bytes = first_id.to_be_bytes();
|
||||
self.updates.delete(writer, first_id_bytes)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue