Pattern I wish was used (even) more: impl AsRef<MyType> for MyType; impl AsRef<MyType> for String; impl AsRef<MyType> for str; fn something(my_type: impl AsRef<MyType>); Being able to write string literals as input to an API is incredible for ergonomics.
-
-
I love the ergonomics of this. But not the binary size of excessive monomorphization. I want both!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.