mirror of
https://github.com/nushell/nushell
synced 2024-11-10 23:24:14 +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 {
|
||||
match (&self.curr, &self.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::Int { val: end, .. }) => compare_floats(*curr, *end as f64),
|
||||
(Value::Int { val: curr, .. }, Value::Float { val: end, .. }) => compare_floats(*curr as f64, *end),
|
||||
(Value::Float { val: curr, .. }, Value::Float { val: end, .. }) => {
|
||||
compare_floats(*curr, *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,
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue