]> git.lizzy.rs Git - rust.git/commitdiff
Update clippy helper function types
authorGrisha Vartanyan <grisha@vartanyan.com>
Fri, 25 Mar 2022 14:05:27 +0000 (15:05 +0100)
committerGrisha Vartanyan <grisha@vartanyan.com>
Fri, 25 Mar 2022 14:05:27 +0000 (15:05 +0100)
src/tools/clippy/clippy_lints/src/regex.rs

index b6d04334de9e50e71b538e4f81cb40b525c65036..a92097e1d24cac28e29bfea5b7307d8e226ae845 100644 (file)
@@ -81,7 +81,7 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
 
 #[allow(clippy::cast_possible_truncation)] // truncation very unlikely here
 #[must_use]
-fn str_span(base: Span, c: regex_syntax::ast::Span, offset: u16) -> Span {
+fn str_span(base: Span, c: regex_syntax::ast::Span, offset: u8) -> Span {
     let offset = u32::from(offset);
     let end = base.lo() + BytePos(u32::try_from(c.end.offset).expect("offset too large") + offset);
     let start = base.lo() + BytePos(u32::try_from(c.start.offset).expect("offset too large") + offset);