diff --git a/tests/auxiliary/option_helpers.rs b/tests/auxiliary/option_helpers.rs index 1734acfb3a2d..add237d6fe07 100644 --- a/tests/auxiliary/option_helpers.rs +++ b/tests/auxiliary/option_helpers.rs @@ -2,7 +2,9 @@ /// The lints included in `option_methods()` should not lint if the call to map is partially /// within a macro macro_rules! opt_map { - ($opt:expr, $map:expr) => {($opt).map($map)}; + ($opt:expr, $map:expr) => { + ($opt).map($map) + }; } /// Struct to generate false positive for Iterator-based lints diff --git a/tests/ui/result_map_unwrap_or_else.rs b/tests/ui/result_map_unwrap_or_else.rs index 2995babe30c1..b3f832399616 100644 --- a/tests/ui/result_map_unwrap_or_else.rs +++ b/tests/ui/result_map_unwrap_or_else.rs @@ -18,18 +18,10 @@ fn result_methods() { // Check RESULT_MAP_UNWRAP_OR_ELSE // single line case - let _ = res.map(|x| x + 1) - - .unwrap_or_else(|e| 0); // should lint even though this call is on a separate line - // multi line cases - let _ = res.map(|x| { - x + 1 - } - ).unwrap_or_else(|e| 0); - let _ = res.map(|x| x + 1) - .unwrap_or_else(|e| - 0 - ); + let _ = res.map(|x| x + 1).unwrap_or_else(|e| 0); // should lint even though this call is on a separate line + // multi line cases + let _ = res.map(|x| x + 1).unwrap_or_else(|e| 0); + let _ = res.map(|x| x + 1).unwrap_or_else(|e| 0); // macro case let _ = opt_map!(res, |x| x + 1).unwrap_or_else(|e| 0); // should not lint }