projects
/
rust-101.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
effe564
)
fix typo
author
leesper
<pascal7718@gmail.com>
Sat, 9 Apr 2016 08:32:44 +0000
(16:32 +0800)
committer
leesper
<pascal7718@gmail.com>
Sat, 9 Apr 2016 08:32:44 +0000
(16:32 +0800)
src/part05.rs
patch
|
blob
|
history
diff --git
a/src/part05.rs
b/src/part05.rs
index 784440cde25acc9093b681eacaa93c2880cc3af0..8a2cd9060247a2010212d85bac47924a24153141 100644
(file)
--- 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`,
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 uniq
i
e and mutable. In other words, right after the match, `ptr`
+//@ and since we wrote `ref mut`, the reference will be uniq
u
e 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) {
//@ 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) {