TIL you can borrow traits in @rustlang. I always thought you needed to use generics! This is huge, since I assume trait references are more efficient as well!
-
-
-
Replying to @rustlang
Just referencing a trait directly, without using any form of templating. trait Test {} fn test(ref: &Test) {}
1 reply 0 retweets 0 likes
Replying to @jD91mZM2
Ah yeah, so, that’s a “trait object” and if it’s more efficient or not really depends. Smaller binaries, slower function call.
1:32 PM - 4 Apr 2018
0 replies
0 retweets
2 likes
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.