Daily #Rust: You can write and the compiler will just figure out all the generic...
buherator @buherator@infosec.place
Daily #Rust:
You can write and the compiler will just figure out all the generics for you:
`let baz = Foo::new(Bar::new());`
But if you want to write:
`return Foo::new(Bar::new());`
... it seems you have to make your function generic, even though the compiler knows exactly what will be returned.
You can write and the compiler will just figure out all the generics for you:
`let baz = Foo::new(Bar::new());`
But if you want to write:
`return Foo::new(Bar::new());`
... it seems you have to make your function generic, even though the compiler knows exactly what will be returned.