mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-06 04:36:32 +00:00
Optim C
This commit is contained in:
@ -168,7 +168,7 @@ pub(crate) fn insert_task_datetime(
|
|||||||
let timestamp = time.unix_timestamp_nanos();
|
let timestamp = time.unix_timestamp_nanos();
|
||||||
let mut task_ids = database.get(wtxn, ×tamp)?.unwrap_or_default();
|
let mut task_ids = database.get(wtxn, ×tamp)?.unwrap_or_default();
|
||||||
task_ids.insert(task_id);
|
task_ids.insert(task_id);
|
||||||
database.put(wtxn, ×tamp, &RoaringBitmap::from_iter(task_ids))?;
|
database.put(wtxn, ×tamp, &task_ids)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ pub(crate) fn remove_task_datetime(
|
|||||||
if existing.is_empty() {
|
if existing.is_empty() {
|
||||||
database.delete(wtxn, ×tamp)?;
|
database.delete(wtxn, ×tamp)?;
|
||||||
} else {
|
} else {
|
||||||
database.put(wtxn, ×tamp, &RoaringBitmap::from_iter(existing))?;
|
database.put(wtxn, ×tamp, &existing)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user