mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-05-15 15:16:51 +02:00
Add note about struct field defaults (#2666)
This commit is contained in:
parent
df57606996
commit
fdb0a398b1
@ -53,6 +53,8 @@ Key Points:
|
|||||||
not important.
|
not important.
|
||||||
- If you already have variables with the right names, then you can create the
|
- If you already have variables with the right names, then you can create the
|
||||||
struct using a shorthand.
|
struct using a shorthand.
|
||||||
|
- Struct fields do not support default values. Default values are specified by
|
||||||
|
implementing the `Default` trait which we will cover later.
|
||||||
|
|
||||||
## More to Explore
|
## More to Explore
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user