]> git.lizzy.rs Git - rust.git/commitdiff
Skip function with no exprs contained
authorHirochika Matsumoto <matsujika@gmail.com>
Sun, 18 Oct 2020 08:27:08 +0000 (17:27 +0900)
committerHirochika Matsumoto <matsujika@gmail.com>
Tue, 17 Nov 2020 16:28:37 +0000 (01:28 +0900)
clippy_lints/src/unnecessary_wrap.rs

index 7ec523293c8e99e7e947125460aea8b0d470b58b..28cc20f000759ec2b7bad39b974247a01e05ab96 100644 (file)
@@ -98,7 +98,7 @@ fn check_fn(
             }
         });
 
-        if can_sugg {
+        if can_sugg && !suggs.is_empty() {
             span_lint_and_then(
                 cx,
                 UNNECESSARY_WRAP,