rust-clippy
rust-clippy copied to clipboard
Lint calling methods that are redundant to deref
For example, vec.as_slice().first() could be just worded as vec.first().
We'd probably want to have a whitelist for this, but in general, calling such methods is redundant.
Probably just another branch in our method chain lint
I'd call this deref_method_call_chain - a method call that is equivalent to a deref followed by another chained method call can be removed.
@rustbot claim