projects
/
rust-101.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make the gray background go all the way to the right
[rust-101.git]
/
workspace
/
src
/
part06.rs
diff --git
a/workspace/src/part06.rs
b/workspace/src/part06.rs
index 72883277ab6304aa4bd7ec0ff8d38b05dac7488a..04a08478f87d428dc75fadc6c1111b9fabce8356 100644
(file)
--- a/
workspace/src/part06.rs
+++ b/
workspace/src/part06.rs
@@
-25,7
+25,9
@@
impl BigInt {
// Now we can write `vec_min`.
fn vec_min(v: &Vec<BigInt>) -> Option<BigInt> {
let mut min: Option<BigInt> = None;
// Now we can write `vec_min`.
fn vec_min(v: &Vec<BigInt>) -> Option<BigInt> {
let mut min: Option<BigInt> = None;
+ // If `v` is a shared borrowed vector, then the default for iterating over it is to call `iter`, the iterator that borrows the elements.
for e in v {
for e in v {
+ let e = e.clone();
unimplemented!()
}
min
unimplemented!()
}
min