mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Rust 1.85 lints (#7019)
N/A 2 changes: 1. Replace Option::map_or(true, ...) with is_none_or(...) 2. Remove unnecessary `Into::into` blocks where the type conversion is apparent from the types
This commit is contained in:
@@ -1113,7 +1113,7 @@ fn max_or<T: Copy + Ord>(opt_x: Option<T>, y: T) -> T {
|
||||
///
|
||||
/// If prev is `None` and `new` is `Some` then `true` is returned.
|
||||
fn monotonic<T: PartialOrd>(new: Option<T>, prev: Option<T>) -> bool {
|
||||
new.is_some_and(|new_val| prev.map_or(true, |prev_val| new_val >= prev_val))
|
||||
new.is_some_and(|new_val| prev.is_none_or(|prev_val| new_val >= prev_val))
|
||||
}
|
||||
|
||||
/// The result of importing a single entry from an interchange file.
|
||||
|
||||
Reference in New Issue
Block a user