Fix clippy (#15489)

# Description
There are some clippy(version 0.1.86) errors on nushell repo. This pr is
trying to fix it.

# User-Facing Changes
Hopefully none.

# Tests + Formatting
NaN

# After Submitting
NaN
This commit is contained in:
Wind
2025-04-06 09:49:28 +08:00
committed by GitHub
parent 67ea25afca
commit 1c6c85d35d
19 changed files with 30 additions and 35 deletions

View File

@ -2678,7 +2678,7 @@ pub fn parse_unit_value<'res>(
if let Some((unit, name, convert)) = unit_groups.iter().find(|x| value.ends_with(x.1)) {
let lhs_len = value.len() - name.len();
let lhs = strip_underscores(value[..lhs_len].as_bytes());
let lhs = strip_underscores(&value.as_bytes()[..lhs_len]);
let lhs_span = Span::new(span.start, span.start + lhs_len);
let unit_span = Span::new(span.start + lhs_len, span.end);
if lhs.ends_with('$') {