rust-lang/rust-clippy

Lint calling methods that are redundant to deref

Open

#2094 aperta il 28 set 2017

Vedi su GitHub
 (3 commenti) (0 reazioni) (1 assegnatario)Rust (1391 fork)batch import
A-lintL-unnecessaryT-middlegood first issue

Metriche repository

Star
 (10.406 star)
Metriche merge PR
 (Merge medio 19g 22h) (113 PR mergiate in 30 g)

Descrizione

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.

Guida contributor