Skip to content

Commit d40cee7

Browse files
committed
Apply implicit_saturating_sub to Clippy sources
1 parent ba5cedd commit d40cee7

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
@@ -1005,11 +1005,7 @@ fn check_doc<'a, Events: Iterator<Item = (pulldown_cmark::Event<'a>, Range<usize
10051005
start -= 1;
10061006
}
10071007

1008-
if start > range.start {
1009-
start - range.start
1010-
} else {
1011-
0
1012-
}
1008+
start.saturating_sub(range.start)
10131009
}
10141010
} else {
10151011
0

0 commit comments

Comments
 (0)