mirror of
https://github.com/nushell/nushell
synced 2025-01-28 21:05:48 +00:00
Fmt
This commit is contained in:
parent
013b12a864
commit
9936946eb5
1 changed files with 9 additions and 3 deletions
|
@ -176,9 +176,15 @@ impl Iterator for RangeIterator {
|
||||||
} else {
|
} else {
|
||||||
match (&self.curr, &self.end) {
|
match (&self.curr, &self.end) {
|
||||||
(Value::Int { val: curr, .. }, Value::Int { val: end, .. }) => Some(curr.cmp(end)),
|
(Value::Int { val: curr, .. }, Value::Int { val: end, .. }) => Some(curr.cmp(end)),
|
||||||
(Value::Float { val: curr, .. }, Value::Float { val: end, .. }) => compare_floats(*curr, *end),
|
(Value::Float { val: curr, .. }, Value::Float { val: end, .. }) => {
|
||||||
(Value::Float { val: curr, .. }, Value::Int { val: end, .. }) => compare_floats(*curr, *end as f64),
|
compare_floats(*curr, *end)
|
||||||
(Value::Int { val: curr, .. }, Value::Float { val: end, .. }) => compare_floats(*curr as f64, *end),
|
}
|
||||||
|
(Value::Float { val: curr, .. }, Value::Int { val: end, .. }) => {
|
||||||
|
compare_floats(*curr, *end as f64)
|
||||||
|
}
|
||||||
|
(Value::Int { val: curr, .. }, Value::Float { val: end, .. }) => {
|
||||||
|
compare_floats(*curr as f64, *end)
|
||||||
|
}
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue