diff options
| author | Son <leson.phung@gmail.com> | 2017-02-03 23:51:50 +1100 |
|---|---|---|
| committer | Son <leson.phung@gmail.com> | 2017-02-03 23:51:50 +1100 |
| commit | 4ddb56bf4dfdc607ae0bd2207da189c4c4d4c14a (patch) | |
| tree | 09475b93a7434eab57cf79dcca986d89dca9d7e0 /src/doc/book | |
| parent | c4cd4e19d976240443ef31968e7b763cf83d6fdb (diff) | |
| download | rust-4ddb56bf4dfdc607ae0bd2207da189c4c4d4c14a.tar.gz rust-4ddb56bf4dfdc607ae0bd2207da189c4c4d4c14a.zip | |
Simplify wording & fix test src/doc
Diffstat (limited to 'src/doc/book')
| -rw-r--r-- | src/doc/book/structs.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/doc/book/structs.md b/src/doc/book/structs.md index 811f7b41967..dcf74cbb0a7 100644 --- a/src/doc/book/structs.md +++ b/src/doc/book/structs.md @@ -117,9 +117,9 @@ fn main() { } ``` -We can initializing a data structure (struct, enum, union) with named fields, -by writing `fieldname` as a shorthand for `fieldname: fieldname`. This allows a -compact syntax for initialization, with less duplication: +Initialization of a data structure (struct, enum, union) can be simplified if +fields of the data structure are initialized with variables which has same +names as the fields. ``` #![feature(field_init_shorthand)] |
