projects
/
rust-101.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
df09db3
)
Update part15.rs: a trivial typo
author
Jihchi Lee
<jihchi@users.noreply.github.com>
Sun, 29 Nov 2020 11:46:44 +0000
(19:46 +0800)
committer
GitHub
<noreply@github.com>
Sun, 29 Nov 2020 11:46:44 +0000
(19:46 +0800)
src/part15.rs
patch
|
blob
|
history
diff --git
a/src/part15.rs
b/src/part15.rs
index e646d342d417763bb4aa2778550217ba19645652..e22d507c615328be99e338ff892001640bffdd28 100644
(file)
--- a/
src/part15.rs
+++ b/
src/part15.rs
@@
-28,7
+28,7
@@
use std::time::Duration;
//@ Rather than giving every field a name, a struct can also be defined by just giving a sequence
//@ of types (similar to how a variant of an `enum` is defined). This is called a *tuple struct*.
//@ It is often used when constructing a *newtype*, as we do here: `ConcurrentCounter` is
//@ Rather than giving every field a name, a struct can also be defined by just giving a sequence
//@ of types (similar to how a variant of an `enum` is defined). This is called a *tuple struct*.
//@ It is often used when constructing a *newtype*, as we do here: `ConcurrentCounter` is
-//@ essentially just a new name for `Arc<Mutex<usize>>`. However, i
s
is a locally declared types,
+//@ essentially just a new name for `Arc<Mutex<usize>>`. However, i
t
is a locally declared types,
//@ so we can give it an inherent implementation and implement traits for it. Since the field is
//@ private, nobody outside this module can even know the type we are wrapping.
//@ so we can give it an inherent implementation and implement traits for it. Since the field is
//@ private, nobody outside this module can even know the type we are wrapping.