intorust / intorust.com

Learn Rust real good.
Other
304 stars 25 forks source link

Mutable borrows: challange #14

Open dankor opened 7 years ago

dankor commented 7 years ago

My code doesn't compile after following the video tutorial, am I missing something or is it's a compiler changes?

The code: https://is.gd/l9IAeS

oylenshpeegul commented 7 years ago

We have to remove the assignment since we're no longer returning anything. That is, if we change

    str1 = join_words(&mut str1, &str2);

to

    join_words(&mut str1, &str2);

then it should work.