3 ms·
None of the snippets in my post indicate borrowing. You can borrow or not borrow any of the types above. It is true, though, that there are differences. With t
by chc 4y ago
None of the snippets in my post indicate borrowing. You can borrow or not borrow any of the types above.
It is true, though, that there are differences. With the generic, you can refer to the type again later, whereas the type is anonymous with `impl Trait`. And `dyn Trait` gives you dynamic dispatch. But in my experience there are usually some differences between the multiple ways to do something in Perk as well.