2517: Fix typos in `tasks/.rs` r=MarinPostma a=ryanrussell

Signed-off-by: Ryan Russell <git@ryanrussell.org>

## What does this PR do?
Readability in `tasks/.rs` files.

## PR checklist
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?


Co-authored-by: Ryan Russell <git@ryanrussell.org>
This commit is contained in:
bors[bot] 2022-06-15 09:27:21 +00:00 committed by GitHub
commit 3340af1ba9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -38,7 +38,7 @@ impl BatchContent {
#[derive(Debug)] #[derive(Debug)]
pub struct Batch { pub struct Batch {
// Only batches that contains a persistant tasks are given an id. Snapshot batches don't have // Only batches that contains a persistent tasks are given an id. Snapshot batches don't have
// an id. // an id.
pub id: Option<BatchId>, pub id: Option<BatchId>,
pub created_at: OffsetDateTime, pub created_at: OffsetDateTime,

View File

@ -33,7 +33,7 @@ pub trait BatchHandler: Sync + Send + 'static {
/// `accept` beforehand. /// `accept` beforehand.
async fn process_batch(&self, batch: Batch) -> Batch; async fn process_batch(&self, batch: Batch) -> Batch;
/// `finish` is called when the result of `process` has been commited to the task store. This /// `finish` is called when the result of `process` has been committed to the task store. This
/// method can be used to perform cleanup after the update has been completed for example. /// method can be used to perform cleanup after the update has been completed for example.
async fn finish(&self, batch: &Batch); async fn finish(&self, batch: &Batch);
} }

View File

@ -189,7 +189,7 @@ impl TaskQueue {
Entry::Occupied(entry) => { Entry::Occupied(entry) => {
// A task list already exists for this index, all we have to to is to push the new // A task list already exists for this index, all we have to to is to push the new
// update to the end of the list. This won't change the order since ids are // update to the end of the list. This won't change the order since ids are
// monotically increasing. // monotonically increasing.
let mut list = entry.get().borrow_mut(); let mut list = entry.get().borrow_mut();
// We only need the first element to be lower than the one we want to // We only need the first element to be lower than the one we want to

View File

@ -122,7 +122,7 @@ impl TaskStore {
} }
/// This methods takes a `Processing` which contains the next task ids to process, and returns /// This methods takes a `Processing` which contains the next task ids to process, and returns
/// the coresponding tasks along with the ownership to the passed processing. /// the corresponding tasks along with the ownership to the passed processing.
/// ///
/// We need get_processing_tasks to take ownership over `Processing` because we need it to be /// We need get_processing_tasks to take ownership over `Processing` because we need it to be
/// valid for 'static. /// valid for 'static.

View File

@ -49,7 +49,7 @@ impl UpdateLoop {
}; };
if let Err(e) = self.process_next_batch().await { if let Err(e) = self.process_next_batch().await {
log::error!("an error occured while processing an update batch: {}", e); log::error!("an error occurred while processing an update batch: {}", e);
} }
} }
} }