rust-lang/rust-clippy

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

Open

#1,658 opened on 2017年4月3日

GitHub で見る
 (2 comments) (0 reactions) (0 assignees)Rust (1,391 forks)batch import
A-lintL-styleT-middlegood first issue

Repository metrics

Stars
 (10,406 stars)
PR merge metrics
 (平均マージ 19d 22h) (30d で 113 merged PRs)

説明

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

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