mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 12:14:43 +00:00
chore: fix warnings
This commit is contained in:
parent
ccb2cceea1
commit
f5a21cac8a
3 changed files with 28 additions and 11 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue