chore: fix warnings

This commit is contained in:
Shunsuke Shibayama 2024-03-22 21:01:47 +09:00
parent ccb2cceea1
commit f5a21cac8a
3 changed files with 28 additions and 11 deletions

View file

@ -1611,17 +1611,13 @@ pub mod value_set {
if !is_homogeneous(set) {
return None;
}
set.iter()
.max_by(|x, y| x.try_cmp(y).unwrap())
.map(Clone::clone)
set.iter().max_by(|x, y| x.try_cmp(y).unwrap()).cloned()
}
pub fn min(set: &Set<ValueObj>) -> Option<ValueObj> {
if !is_homogeneous(set) {
return None;
}
set.iter()
.min_by(|x, y| x.try_cmp(y).unwrap())
.map(Clone::clone)
set.iter().min_by(|x, y| x.try_cmp(y).unwrap()).cloned()
}
}