Skip to content

Commit

Permalink
Update clippy helper function types
Browse files Browse the repository at this point in the history
  • Loading branch information
GrishaVar committed Mar 25, 2022
1 parent b51f20e commit c3840c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/regex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl<'tcx> LateLintPass<'tcx> for Regex {

#[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);
Expand Down

0 comments on commit c3840c9

Please sign in to comment.