9444db5f19
This allows structs to use the default value for each field defined in the struct’s `std::default::Default` implementation, rather then the default value for the field’s type. ``` struct StructDefault { a: i32, b: String, } impl Default for StructDefault { fn default() -> StructDefault { StructDefault{ a: 100, b: "default".to_string(), } } } ``` The code above will now return `100` for field `a` and `”default”` for `b`, rather then `0` and `””` respectively. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |