rust-lang/rust-clippy

don't fold(..) an Option when you can map_or(..)

Open

#1658 opened on Apr 3, 2017

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Rust (10,406 stars) (1,391 forks)batch import
A-lintL-styleT-middlegood first issue

Description

catch my_option.iter().fold(my_val, |x, y| ..y), suggest my_option.map_or(my_val, |x| ..my_val)

Contributor guide