X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/63b7a79069a399c32d575bb71832fcad134117c9..d5cee5ca7d257faea7f68b8812bf4d1a88ab5229:/src/part05.rs?ds=sidebyside diff --git a/src/part05.rs b/src/part05.rs index 71d712a..8a2cd90 100644 --- a/src/part05.rs +++ b/src/part05.rs @@ -124,7 +124,7 @@ enum Variant { Text(String), } //@ Now consider the following piece of code. Like above, `n` will be a reference to a part of `var`, -//@ and since we wrote `ref mut`, the reference will be exclusive and mutable. In other words, right after the match, `ptr` +//@ and since we wrote `ref mut`, the reference will be unique and mutable. In other words, right after the match, `ptr` //@ points to the number that's stored in `var`, where `var` is a `Number`. Remember that `_` means //@ "we don't care". fn work_on_variant(mut var: Variant, text: String) {