projects
/
rust-101.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
part10: typo
[rust-101.git]
/
src
/
part07.rs
diff --git
a/src/part07.rs
b/src/part07.rs
index 151a3d68ea91cac0bce206e8b979835473497e5f..4c143d5ae87dbe2ad169e97d8136d59ea72634b8 100644
(file)
--- a/
src/part07.rs
+++ b/
src/part07.rs
@@
-17,10
+17,10
@@
pub trait Minimum {
pub fn vec_min<T: Minimum>(v: &Vec<T>) -> Option<&T> {
let mut min: Option<&T> = None;
for e in v {
pub fn vec_min<T: Minimum>(v: &Vec<T>) -> Option<&T> {
let mut min: Option<&T> = None;
for e in v {
- min = Some(match min {
/*@*/
- None => e,
/*@*/
- Some(n) => n.min(e)
/*@*/
- });
/*@*/
+ min = Some(match min {
+ None => e,
+ Some(n) => n.min(e)
+ });
}
min
}
}
min
}