mirror of
https://github.com/nushell/nushell.git
synced 2024-12-04 06:15:27 +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, .. } => {
|
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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user