rust-lang/rust-clippy
View on GitHubLint `set_*` and `get_*` methods that do nothing but access the field
Open
#1,673 opened on Apr 12, 2017
A-lintL-styleT-middlegood first issue
Repository metrics
- Stars
- (10,406 stars)
- PR merge metrics
- (Avg merge 19d 22h) (113 merged PRs in 30d)
Description
It is not idiomatic in Rust to have setters and getters. Make the field public instead.
If the type only has a get_foo method but not a set_foo method, suggest naming it foo instead.