Skip to content

Commit 8be8a1e

Browse files
committed
Skip function with no exprs contained
1 parent b13b041 commit 8be8a1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/unnecessary_wrap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl<'tcx> LateLintPass<'tcx> for UnnecessaryWrap {
9898
}
9999
});
100100

101-
if can_sugg {
101+
if can_sugg && !suggs.is_empty() {
102102
span_lint_and_then(
103103
cx,
104104
UNNECESSARY_WRAP,

0 commit comments

Comments
 (0)