Remove unneeded clones in select (#14283)

# Description

This PR removes some unneeded `clone()` calls in the implementation of
`select`.

# User-Facing Changes

There are no user-facing changes.
This commit is contained in:
Alex Ionescu 2024-11-08 07:37:38 +01:00 committed by GitHub
parent bdf63420d1
commit 919d55f3fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,12 +64,12 @@ produce a table, a list will produce a list, and a record will produce a record.
Value::String { val, .. } => { Value::String { val, .. } => {
let cv = CellPath { let cv = CellPath {
members: vec![PathMember::String { members: vec![PathMember::String {
val: val.clone(), val,
span: *col_span, span: *col_span,
optional: false, optional: false,
}], }],
}; };
new_columns.push(cv.clone()); new_columns.push(cv);
} }
Value::Int { val, internal_span } => { Value::Int { val, internal_span } => {
if val < 0 { if val < 0 {
@ -87,7 +87,7 @@ produce a table, a list will produce a list, and a record will produce a record.
optional: false, optional: false,
}], }],
}; };
new_columns.push(cv.clone()); new_columns.push(cv);
} }
x => { x => {
return Err(ShellError::CantConvert { return Err(ShellError::CantConvert {