projects
/
rust-101.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix the main file(s)
[rust-101.git]
/
src
/
part06.rs
diff --git
a/src/part06.rs
b/src/part06.rs
index e159ca5582ed9b2326c0884b2805509fc1fb7749..e357d0e1686325bb4695c673e65cdc0069b002dc 100644
(file)
--- a/
src/part06.rs
+++ b/
src/part06.rs
@@
-25,7
+25,8
@@
impl BigInt {
}
}
}
}
-// Now we can write `vec_min`. In order to make it type-check, we have make a deep copy of e.
+// Now we can write `vec_min`. However, in order to make it type-check, we have to make a full (deep) copy of e
+// by calling `clone()`.
fn vec_min(v: &Vec<BigInt>) -> Option<BigInt> {
let mut min: Option<BigInt> = None;
for e in v {
fn vec_min(v: &Vec<BigInt>) -> Option<BigInt> {
let mut min: Option<BigInt> = None;
for e in v {