Is it me or is this kind of redundant?
Say I have a type T that can be initialized with integers. Rust syntax would make me do:
let a: T = 1.into();
Why must I include the into()? If Rust can already infer the type it needs to become, why can't I do
let a: T = 1;
as some syntactic sugar for 1.into()? Does anyone else find this kind of annoying?
Since the code I gave is a bad example, this is the code I had to write that motivated me to write this post, when I was testing a matrix type whose entries were a type that is initialized by integers: