Skip to content

Commit

Permalink
add a debug_assert according to the comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Guanqun Lu committed Dec 17, 2019
1 parent 720578d commit cf1e28e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions clippy_lints/src/methods/map_unwrap_or.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pub(super) fn lint<'a, 'tcx>(
arg, suggest
)
} else {
debug_assert!(is_result);
"called `map(f).unwrap_or(a)` on a Result value. \
This can be done more directly by calling `map_or(a, f)` instead"
.to_string()
Expand Down

0 comments on commit cf1e28e

Please sign in to comment.