You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-06-27 11:08:45 +02:00
Fix unclear wording in default.md (#915)
This commit is contained in:
@ -38,7 +38,7 @@ fn main() {
|
|||||||
<details>
|
<details>
|
||||||
|
|
||||||
* It can be implemented directly or it can be derived via `#[derive(Default)]`.
|
* 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.
|
* This means all types in the struct must implement `Default` too.
|
||||||
* Standard Rust types often implement `Default` with reasonable values (e.g. `0`, `""`, etc).
|
* Standard Rust types often implement `Default` with reasonable values (e.g. `0`, `""`, etc).
|
||||||
* The partial struct copy works nicely with default.
|
* The partial struct copy works nicely with default.
|
||||||
|
Reference in New Issue
Block a user