diff options
| author | Hirochika Matsumoto <matsujika@gmail.com> | 2020-10-18 17:27:08 +0900 |
|---|---|---|
| committer | Hirochika Matsumoto <matsujika@gmail.com> | 2020-11-18 01:28:37 +0900 |
| commit | c7692cf7493facefd520a98bf86aa1f4a031f435 (patch) | |
| tree | 9e6f996382455b00909189db68fbbfbabc317c59 | |
| parent | c5447eb3c167025fcc1b842fabd7bb43a2eb1e9e (diff) | |
| download | rust-c7692cf7493facefd520a98bf86aa1f4a031f435.tar.gz rust-c7692cf7493facefd520a98bf86aa1f4a031f435.zip | |
Skip function with no exprs contained
| -rw-r--r-- | clippy_lints/src/unnecessary_wrap.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/unnecessary_wrap.rs b/clippy_lints/src/unnecessary_wrap.rs index 7ec523293c8..28cc20f0007 100644 --- a/clippy_lints/src/unnecessary_wrap.rs +++ b/clippy_lints/src/unnecessary_wrap.rs @@ -98,7 +98,7 @@ impl<'tcx> LateLintPass<'tcx> for UnnecessaryWrap { } }); - if can_sugg { + if can_sugg && !suggs.is_empty() { span_lint_and_then( cx, UNNECESSARY_WRAP, |
