intorust icon indicating copy to clipboard operation
intorust copied to clipboard

Mutable borrows: challange

Open dankor opened this issue 9 years ago • 1 comments

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

dankor avatar Nov 30 '16 12:11 dankor

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.

oylenshpeegul avatar Jan 03 '17 14:01 oylenshpeegul