rust-lang/rust-clippy

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

Open

#1,658 建立於 2017年4月3日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)Rust (1,391 fork)batch import
A-lintL-styleT-middlegood first issue

倉庫指標

Star
 (10,406 star)
PR 合併指標
 (平均合併 19天 22小時) (30 天內合併 113 個 PR)

描述

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

貢獻者指南