1
0
mirror of https://github.com/nushell/nushell.git synced 2025-05-17 08:20:49 +02:00
nushell/crates/nu-command/tests/commands/path
Stefan Holderbach 406df7f208
Avoid taking unnecessary ownership of intermediates ()
# Description

Judiciously try to avoid allocations/clone by changing the signature of
functions

- **Don't pass str by value unnecessarily if only read**
- **Don't require a vec in `Sandbox::with_files`**
- **Remove unnecessary string clone**
- **Fixup unnecessary borrow**
- **Use `&str` in shape color instead**
- **Vec -> Slice**
- **Elide string clone**
- **Elide `Path` clone**
- **Take &str to elide clone in tests**

# User-Facing Changes
None

# Tests + Formatting
This touches many tests purely in changing from owned to borrowed/static
data
2024-05-04 00:53:15 +00:00
..
basename.rs Add long options for path () 2023-10-19 22:07:01 +02:00
dirname.rs Add long options for path () 2023-10-19 22:07:01 +02:00
exists.rs Avoid taking unnecessary ownership of intermediates () 2024-05-04 00:53:15 +00:00
expand.rs Avoid taking unnecessary ownership of intermediates () 2024-05-04 00:53:15 +00:00
join.rs Allow parse-time evaluation of calls, pipelines and subexpressions () 2023-08-26 16:41:29 +03:00
mod.rs remove warnings in nu_command tests () 2023-08-29 13:18:52 -07:00
parse.rs bump rust-toolchain to 1.72.1 () 2023-11-16 15:14:45 -06:00
split.rs Allow parse-time evaluation of calls, pipelines and subexpressions () 2023-08-26 16:41:29 +03:00
type_.rs Avoid taking unnecessary ownership of intermediates () 2024-05-04 00:53:15 +00:00