From ff51d51af5fe1df973d276c12ba9bdac84d94382 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Mon, 12 Sep 2016 03:07:09 +0300 Subject: [PATCH] Remove unnecessary "replace" word --- src/part06.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/part06.rs b/src/part06.rs index 4c0e6ce..7113094 100644 --- a/src/part06.rs +++ b/src/part06.rs @@ -44,7 +44,7 @@ fn vec_min(v: &Vec) -> Option { //@ The answer is already hidden in the type of `vec_min`: `v` is just borrowed, but //@ the Option that it returns is *owned*. We can't just return one of the elements of `v`, //@ as that would mean that it is no longer in the vector! In our code, this comes up when we update -//@ the intermediate variable `min`, which also has type `Option`. If you replace get rid of the +//@ the intermediate variable `min`, which also has type `Option`. If you get rid of the //@ `e.clone()`, Rust will complain "Cannot move out of borrowed content". That's because //@ `e` is a `&BigInt`. Assigning `min = Some(*e)` works just like a function call: Ownership of the //@ underlying data is transferred from `e` to `min`. But that's not allowed, since -- 2.30.2