X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/fff8ebeb3f0b84c71275cbb5adee0aad6114f79b..7df9cdaae2db9969c8b83c4c69ccc21eb0973eb4:/workspace/src/part06.rs?ds=sidebyside diff --git a/workspace/src/part06.rs b/workspace/src/part06.rs index a62560e..3bc7d08 100644 --- a/workspace/src/part06.rs +++ b/workspace/src/part06.rs @@ -1,5 +1,3 @@ -// ***Remember to enable/add this part in `main.rs`!*** - // Rust-101, Part 06: Copy, Lifetimes // ================================== @@ -27,7 +25,9 @@ impl BigInt { // Now we can write `vec_min`. fn vec_min(v: &Vec) -> Option { let mut min: Option = None; + // If `v` is a shared reference to a vector, then the default for iterating over it is to call `iter`, the iterator that borrows the elements. for e in v { + let e = e.clone(); unimplemented!() } min