fix: set correct type of error for max
This commit is contained in:
@@ -9,7 +9,7 @@ fn max_of(values: Vec<u16>) -> Result<Outcome, FailedTo> {
|
|||||||
values
|
values
|
||||||
.iter()
|
.iter()
|
||||||
.max()
|
.max()
|
||||||
.ok_or(FailedTo::FindMin)
|
.ok_or(FailedTo::FindMax)
|
||||||
.map(|min| Outcome::Scalar(*min))
|
.map(|min| Outcome::Scalar(*min))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#[derive(Debug, PartialEq, PartialOrd, Eq, Ord, Clone, Copy, Hash)]
|
#[derive(Debug, PartialEq, PartialOrd, Eq, Ord, Clone, Copy, Hash)]
|
||||||
pub enum E {
|
pub enum E {
|
||||||
|
FindMax,
|
||||||
FindMin,
|
FindMin,
|
||||||
ProcessInput,
|
ProcessInput,
|
||||||
SumValues,
|
SumValues,
|
||||||
|
|||||||
Reference in New Issue
Block a user