From 748f6b176a14a86b6b25b96fa6379817a9648653 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 3 Jul 2022 13:32:28 -0700 Subject: [PATCH] clippy --- parcel_sourcemap/src/lib.rs | 2 +- parcel_sourcemap/src/mapping_line.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parcel_sourcemap/src/lib.rs b/parcel_sourcemap/src/lib.rs index 5312c1a..0288c0c 100644 --- a/parcel_sourcemap/src/lib.rs +++ b/parcel_sourcemap/src/lib.rs @@ -631,7 +631,7 @@ impl SourceMap { } let line = generated_line as usize; - let abs_offset = generated_line_offset.abs() as usize; + let abs_offset = generated_line_offset.unsigned_abs() as usize; if generated_line_offset > 0 { if line > self.inner.mapping_lines.len() { self.ensure_lines(line + abs_offset); diff --git a/parcel_sourcemap/src/mapping_line.rs b/parcel_sourcemap/src/mapping_line.rs index 376b647..4fedff4 100644 --- a/parcel_sourcemap/src/mapping_line.rs +++ b/parcel_sourcemap/src/mapping_line.rs @@ -108,7 +108,7 @@ impl MappingLine { index = start_index; } - let abs_offset = generated_column_offset.abs() as u32; + let abs_offset = generated_column_offset.unsigned_abs() as u32; for i in index..self.mappings.len() { let mapping = &mut self.mappings[i]; mapping.generated_column = if generated_column_offset < 0 {