rust-lang/rust-clippy

Lint calling methods that are redundant to deref

Open

#2,094 opened on 2017年9月28日

GitHub で見る
 (3 comments) (0 reactions) (1 assignee)Rust (10,406 stars) (1,391 forks)batch import
A-lintL-unnecessaryT-middlegood first issue

説明

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.

コントリビューターガイド