rust-lang/rust-clippy
View on GitHubdon't fold(..) an Option when you can map_or(..)
Open
#1,658 opened on Apr 3, 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
catch my_option.iter().fold(my_val, |x, y| ..y), suggest my_option.map_or(my_val, |x| ..my_val)