Add option_and_then_some lint

This commit is contained in:
Lzu Tao
2019-08-15 10:53:11 +07:00
parent f01a0c0e08
commit 7065239da5
9 changed files with 201 additions and 10 deletions

View File

@@ -123,13 +123,13 @@ pub fn gen_deprecated(lints: &[Lint]) -> Vec<String> {
lints
.iter()
.filter_map(|l| {
l.clone().deprecation.and_then(|depr_text| {
Some(vec![
l.clone().deprecation.map(|depr_text| {
vec![
" store.register_removed(".to_string(),
format!(" \"clippy::{}\",", l.name),
format!(" \"{}\",", depr_text),
" );".to_string(),
])
]
})
})
.flatten()