Rust has two major mechanisms for delegating logic: enums and trait objects,
and it may be unclear when to use one or the other. In this post, I will
walk through how each works, what the tradeoffs are, and how to choose the
right option for your code.
The Rust compiler ships with a number of useful lints on by default,
and many use Clippy to provide additional lints. It’s less well known
that the Rust compiler ships with some useful lints which are set to
allow by default, meaning they don’t generate warnings. In this post,
I’ll explain what each of these lints does, and why it might be useful.