mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
Rollup merge of #95251 - GrishaVar:hashes-u16-to-u8, r=dtolnay
Reduce max hash in raw strings from u16 to u8 [Relevant discussion](https://rust-lang.zulipchat.com/#narrow/stream/237824-t-lang.2Fdoc/topic/Max.20raw.20string.20delimiters)
This commit is contained in:
commit
7af3565083
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue