1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-14 22:15:54 +02:00

Use non-generic default (#999)

This commit is contained in:
Dominik Maier 2023-07-18 07:38:48 +02:00 committed by GitHub
parent 3f1a8d8ca1
commit 797260b813
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,11 +56,11 @@ fn main() {
}
fn create_default() {
let tmp = Person {
..Default::default()
..Person::default()
};
let tmp = Person {
name: "Sam".to_string(),
..Default::default()
..Person::default()
};
}
```