From 8e16bb64690a172088a513350b71d0ceebcfd6df Mon Sep 17 00:00:00 2001 From: simon-curtis Date: Fri, 8 Nov 2024 10:39:23 +0000 Subject: [PATCH] Clippy fixes --- crates/nu-command/src/bytes/at.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/nu-command/src/bytes/at.rs b/crates/nu-command/src/bytes/at.rs index 784459cd9e..54f93abf27 100644 --- a/crates/nu-command/src/bytes/at.rs +++ b/crates/nu-command/src/bytes/at.rs @@ -177,12 +177,12 @@ fn map_value(input: &Value, args: &Arguments, head: Span) -> Value { fn resolve_relative_range(range: &Subbytes, len: &usize) -> (usize, usize) { let start = match range.0 { - start if start < 0 => len.checked_sub(start.abs() as usize).unwrap_or(0), + start if start < 0 => len.checked_sub(start.unsigned_abs()).unwrap_or(0), start => start as usize, }; let end = match range.1 { - end if end < 0 => len.checked_sub(end.abs() as usize).unwrap_or(0), + end if end < 0 => len.checked_sub(end.unsigned_abs()).unwrap_or(0), end => end as usize, };