cargo fmt

This commit is contained in:
Loïc Lecrenier 2022-10-19 16:18:00 +02:00 committed by Clément Renault
parent ec3391808d
commit 23b01a58df
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -80,15 +80,24 @@ impl IndexScheduler {
})?; })?;
} }
assert!(old_task.enqueued_at != task.enqueued_at, "Cannot update a task's enqueued_at time"); assert!(
old_task.enqueued_at != task.enqueued_at,
"Cannot update a task's enqueued_at time"
);
if old_task.started_at != task.started_at { if old_task.started_at != task.started_at {
assert!(old_task.started_at.is_none(), "Cannot update a task's started_at time"); assert!(
old_task.started_at.is_none(),
"Cannot update a task's started_at time"
);
if let Some(started_at) = task.started_at { if let Some(started_at) = task.started_at {
insert_task_datetime(wtxn, self.started_at, started_at, task.uid)?; insert_task_datetime(wtxn, self.started_at, started_at, task.uid)?;
} }
} }
if old_task.finished_at != task.finished_at { if old_task.finished_at != task.finished_at {
assert!(old_task.finished_at.is_none(), "Cannot update a task's finished_at time"); assert!(
old_task.finished_at.is_none(),
"Cannot update a task's finished_at time"
);
if let Some(finished_at) = task.finished_at { if let Some(finished_at) = task.finished_at {
insert_task_datetime(wtxn, self.finished_at, finished_at, task.uid)?; insert_task_datetime(wtxn, self.finished_at, finished_at, task.uid)?;
} }
@ -191,7 +200,6 @@ pub(crate) fn insert_task_datetime(
Ok(()) Ok(())
} }
pub(crate) fn remove_task_datetime( pub(crate) fn remove_task_datetime(
wtxn: &mut RwTxn, wtxn: &mut RwTxn,
database: Database<OwnedType<BEI128>, CboRoaringBitmapCodec>, database: Database<OwnedType<BEI128>, CboRoaringBitmapCodec>,