Skip function with no exprs contained

This commit is contained in:
Hirochika Matsumoto 2020-10-18 17:27:08 +09:00
parent c5447eb3c1
commit c7692cf749

View file

@ -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,