Skip to content

Commit 678dcdd

Browse files
committed
Apply needless_return suggestions
1 parent b885035 commit 678dcdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/methods/option_map_or_none.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub(super) fn check<'tcx>(
9797
let func_snippet = snippet(cx, map_arg.span, "..");
9898
let msg = "called `map_or(None, ..)` on an `Option` value. This can be done more directly by calling \
9999
`and_then(..)` instead";
100-
return span_lint_and_sugg(
100+
span_lint_and_sugg(
101101
cx,
102102
OPTION_MAP_OR_NONE,
103103
expr.span,
@@ -110,7 +110,7 @@ pub(super) fn check<'tcx>(
110110
let msg = "called `map_or(None, Some)` on a `Result` value. This can be done more directly by calling \
111111
`ok()` instead";
112112
let self_snippet = snippet(cx, recv.span, "..");
113-
return span_lint_and_sugg(
113+
span_lint_and_sugg(
114114
cx,
115115
RESULT_MAP_OR_INTO_OPTION,
116116
expr.span,

0 commit comments

Comments
 (0)