We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7118e77 commit 465920bCopy full SHA for 465920b
src/operations.rs
@@ -100,7 +100,7 @@ impl NumOperation for Max {
100
.fold((None, 0), |(a, count), b| {
101
let max = match (a, b) {
102
(None, b) => Some(b), //FIXME: if b.is_finite() { Some(b) } else { None },
103
- (a, b) => Some(std::cmp::max_by(a.unwrap(), b, |x, y| {
+ (Some(a), b) => Some(std::cmp::max_by(a, b, |x, y| {
104
x.partial_cmp(y).unwrap_or(std::cmp::Ordering::Greater)
105
})),
106
};
@@ -153,7 +153,7 @@ impl NumOperation for Min {
153
154
let min = match (a, b) {
155
156
- (a, b) => Some(std::cmp::min_by(a.unwrap(), b, |x, y| {
+ (Some(a), b) => Some(std::cmp::min_by(a, b, |x, y| {
157
x.partial_cmp(y).unwrap_or(std::cmp::Ordering::Less)
158
159
0 commit comments