1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-04-24 00:30:29 +02:00

Fix unclear wording in default.md ()

This commit is contained in:
Martin Geisler 2023-07-06 16:25:16 +02:00 committed by GitHub
parent b573caad05
commit 02359573a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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.