A shorter way to write default. Provide :
___()as a shorthand forDefault::default()i32::___()instead ofi32::default()
Based on the internals Rust discussion
Also check the Defaults crate which use default() instead of Default::default()
Examples
let b : i32 = Defaultdefault; // Default Rust
let a : i32 = ___; // Now
assert_eq!;
Can also be used with function :
let a = f; // Default Rust
let b = f; // Now
assert_eq!;
Can also be used to initialize complex Rust struct when implementing the Default trait :
Uniform syntax : MyStruct::___() instead of MyStruct::default() :
type T = i32; // any type with default
assert_eq!;