Skip to content

Commit

Permalink
fix: lints by allowing expect_used
Browse files Browse the repository at this point in the history
  • Loading branch information
saibatizoku committed Feb 13, 2024
1 parent fecfcbf commit 1b9e23a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions hermes/bin/src/runtime/host/hermes/cron/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,12 @@ fn cron_time_to_cron_sched(cron_time: &CronTime, min_val: u8, max_val: u8) -> Cr
// Check if the cron components overlap
if cron_component.overlaps(*other) {
// Merge the two cron components
let merged = cron_component
.merge(*other)
.expect("Should be able to merge");
// Replace the cron component downstream with the merged value
*other = merged;
// Once merged, stop iterating over the remaining cron components
break;
if let Some(merged) = cron_component.merge(*other) {
*other = merged;
// Once merged, stop iterating over the remaining cron
// components
break;
}
}
}
}
Expand Down Expand Up @@ -486,6 +485,7 @@ impl PartialOrd for CronComponent {

impl Eq for CronComponent {}

#[allow(clippy::expect_used)]
impl Ord for CronComponent {
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
self.partial_cmp(other)
Expand Down

0 comments on commit 1b9e23a

Please sign in to comment.