You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-07-05 14:10:29 +02:00
Add note about struct field defaults (#2666)
This commit is contained in:
@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user