mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
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:
@ -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('$') {
|
||||
|
Reference in New Issue
Block a user