3 ms·
> Use impl types as arguments rather than generic constraints when you can Eep. No. At least, not in anything public. Universal impl trait arguments can't be t
by ElderKorihor 4y ago
> Use impl types as arguments rather than generic constraints when you can
Eep. No. At least, not in anything public. Universal impl trait arguments can't be turbofished, so you're placing an unnecessary constraint on your caller.
- avinassh 4y ago> Universal impl trait arguments can't be turbofished, so you're placing an unnecessary constraint on your caller. What does this mean?
- orf 4y agoAs I understand it &impl Meower also uses dynamic dispatch, whereas the generic version will generate a specialized version for each concrete type it is called with.
- charrondev 4y agoAre you sure? I thought that was dyn Meower.
- orf 4y agoYou’re right! My bad