Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
🚨 Fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
TilBlechschmidt committed Mar 6, 2021
1 parent 690d0b3 commit 58679c9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
4 changes: 2 additions & 2 deletions core/src/libraries/lifecycle/heart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ impl Heart {
pin_mut!(sigterm, ctrl_c);

select! {
_ = sigterm => (),
_ = ctrl_c => (),
_ = sigterm => {},
_ = ctrl_c => {},
};
}

Expand Down
16 changes: 8 additions & 8 deletions core/src/libraries/scheduling/job_scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ impl fmt::Display for JobStatus {

impl PartialEq for JobStatus {
fn eq(&self, other: &Self) -> bool {
match (self, other) {
(&JobStatus::Startup, &JobStatus::Startup) => true,
(&JobStatus::Restarting, &JobStatus::Restarting) => true,
(&JobStatus::CrashLoopBackOff, &JobStatus::CrashLoopBackOff) => true,
(&JobStatus::Terminated, &JobStatus::Terminated) => true,
(&JobStatus::Ready(_), &JobStatus::Ready(_)) => true,
_ => false,
}
matches!(
(self, other),
(&JobStatus::Startup, &JobStatus::Startup)
| (&JobStatus::Restarting, &JobStatus::Restarting)
| (&JobStatus::CrashLoopBackOff, &JobStatus::CrashLoopBackOff)
| (&JobStatus::Terminated, &JobStatus::Terminated)
| (&JobStatus::Ready(_), &JobStatus::Ready(_))
)
}
}

Expand Down
7 changes: 2 additions & 5 deletions core/src/libraries/storage/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,8 @@ impl FileSystemScanner {
}

async fn process_stream(&self, mut stream: ReadDir) {
while let Ok(entry) = stream.next_entry().await {
match entry {
None => break,
Some(entry) => self.process_entry(entry).await,
}
while let Ok(Some(entry)) = stream.next_entry().await {
self.process_entry(entry).await
}
}

Expand Down
5 changes: 1 addition & 4 deletions core/src/libraries/storage/storage_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,7 @@ impl StorageHandler {
let transaction = self.pool.begin().await?;
let scanner = scan::FileSystemScanner::new(transaction, root);

let resulting_transaction = scanner
.scan()
.await
.ok_or_else(|| StorageError::InternalError)?;
let resulting_transaction = scanner.scan().await.ok_or(StorageError::InternalError)?;

resulting_transaction.commit().await?;

Expand Down

0 comments on commit 58679c9

Please sign in to comment.