mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-04-24 00:30:29 +02:00
Fix unclear wording in default.md (#915)
This commit is contained in:
parent
b573caad05
commit
02359573a4
@ -38,7 +38,7 @@ fn main() {
|
||||
<details>
|
||||
|
||||
* It can be implemented directly or it can be derived via `#[derive(Default)]`.
|
||||
* Derived implementation will produce an instance where all fields are set to their default values.
|
||||
* A derived implementation will produce a value where all fields are set to their default values.
|
||||
* This means all types in the struct must implement `Default` too.
|
||||
* Standard Rust types often implement `Default` with reasonable values (e.g. `0`, `""`, etc).
|
||||
* The partial struct copy works nicely with default.
|
||||
|
Loading…
x
Reference in New Issue
Block a user