mirror of
https://github.com/google/comprehensive-rust.git
synced 2024-12-15 14:27:50 +02:00
Use non-generic default (#999)
This commit is contained in:
parent
3f1a8d8ca1
commit
797260b813
@ -56,11 +56,11 @@ fn main() {
|
|||||||
}
|
}
|
||||||
fn create_default() {
|
fn create_default() {
|
||||||
let tmp = Person {
|
let tmp = Person {
|
||||||
..Default::default()
|
..Person::default()
|
||||||
};
|
};
|
||||||
let tmp = Person {
|
let tmp = Person {
|
||||||
name: "Sam".to_string(),
|
name: "Sam".to_string(),
|
||||||
..Default::default()
|
..Person::default()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user