Skip to content

Commit 029a6db

Browse files
committed
Apply implicit_saturating_sub to Clippy sources
1 parent 60e1d7e commit 029a6db

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

clippy_lints/src/doc/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,11 +1010,7 @@ fn check_doc<'a, Events: Iterator<Item = (pulldown_cmark::Event<'a>, Range<usize
10101010
start -= 1;
10111011
}
10121012

1013-
if start > range.start {
1014-
start - range.start
1015-
} else {
1016-
0
1017-
}
1013+
start.saturating_sub(range.start)
10181014
}
10191015
} else {
10201016
0

0 commit comments

Comments
 (0)