Clippy fixes

This commit is contained in:
simon-curtis 2024-11-08 10:39:23 +00:00 committed by Simon Curtis
parent 946da5ea5f
commit 8e16bb6469

View File

@ -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,
};