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
|
||||
.iter()
|
||||
.max()
|
||||
.ok_or(FailedTo::FindMin)
|
||||
.ok_or(FailedTo::FindMax)
|
||||
.map(|min| Outcome::Scalar(*min))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#[derive(Debug, PartialEq, PartialOrd, Eq, Ord, Clone, Copy, Hash)]
|
||||
pub enum E {
|
||||
FindMax,
|
||||
FindMin,
|
||||
ProcessInput,
|
||||
SumValues,
|
||||
|
||||
Reference in New Issue
Block a user