mirror of
https://github.com/nushell/nushell.git
synced 2024-12-03 13:53:59 +01:00
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:
parent
bdf63420d1
commit
919d55f3fc
@ -64,12 +64,12 @@ produce a table, a list will produce a list, and a record will produce a record.
|
||||
Value::String { val, .. } => {
|
||||
let cv = CellPath {
|
||||
members: vec![PathMember::String {
|
||||
val: val.clone(),
|
||||
val,
|
||||
span: *col_span,
|
||||
optional: false,
|
||||
}],
|
||||
};
|
||||
new_columns.push(cv.clone());
|
||||
new_columns.push(cv);
|
||||
}
|
||||
Value::Int { val, internal_span } => {
|
||||
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,
|
||||
}],
|
||||
};
|
||||
new_columns.push(cv.clone());
|
||||
new_columns.push(cv);
|
||||
}
|
||||
x => {
|
||||
return Err(ShellError::CantConvert {
|
||||
|
Loading…
Reference in New Issue
Block a user