mirror of
https://github.com/astral-sh/ruff
synced 2026-01-20 21:10:48 -05:00
Use #[expect(lint)] over #[allow(lint)] where possible (#17822)
This commit is contained in:
@@ -1459,7 +1459,7 @@ impl<'src> Lexer<'src> {
|
||||
|
||||
/// Retrieves the current offset of the cursor within the source code.
|
||||
// SAFETY: Lexer doesn't allow files larger than 4GB
|
||||
#[allow(clippy::cast_possible_truncation)]
|
||||
#[expect(clippy::cast_possible_truncation)]
|
||||
#[inline]
|
||||
fn offset(&self) -> TextSize {
|
||||
TextSize::new(self.source.len() as u32) - self.cursor.text_len()
|
||||
|
||||
Reference in New Issue
Block a user