Lint for chaining flatten after map
This change adds a lint to check for instances of `map(..).flatten()` that can be trivially shortened to `flat_map(..)` Closes #3196
This commit is contained in:
@@ -473,6 +473,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
|
||||
loops::EXPLICIT_ITER_LOOP,
|
||||
matches::SINGLE_MATCH_ELSE,
|
||||
methods::FILTER_MAP,
|
||||
methods::MAP_FLATTEN,
|
||||
methods::OPTION_MAP_UNWRAP_OR,
|
||||
methods::OPTION_MAP_UNWRAP_OR_ELSE,
|
||||
methods::RESULT_MAP_UNWRAP_OR_ELSE,
|
||||
|
||||
Reference in New Issue
Block a user