1
0
mirror of https://github.com/nushell/nushell.git synced 2025-03-31 19:27:09 +02:00
nushell/crates/nu-command/tests/format_conversions
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
..
csv.rs Avoid taking unnecessary ownership of intermediates () 2024-05-04 00:53:15 +00:00
html.rs Remove feat extra and include in default () 2024-03-10 17:29:02 +01:00
json.rs Avoid taking unnecessary ownership of intermediates () 2024-05-04 00:53:15 +00:00
markdown.rs Clean up tests containing unnecessary cwd: tokens () 2023-07-17 18:43:51 +02:00
mod.rs Msgpack commands () 2024-04-26 06:23:16 -05:00
msgpack.rs Msgpack commands () 2024-04-26 06:23:16 -05:00
msgpackz.rs Msgpack commands () 2024-04-26 06:23:16 -05:00
nuon.rs Deprecate register and add plugin use () 2024-04-23 06:37:50 -05:00
ods.rs Add long options for formats () 2023-10-08 19:07:09 +02:00
ssv.rs Avoid taking unnecessary ownership of intermediates () 2024-05-04 00:53:15 +00:00
toml.rs Clean up tests containing unnecessary cwd: tokens () 2023-07-17 18:43:51 +02:00
tsv.rs Avoid taking unnecessary ownership of intermediates () 2024-05-04 00:53:15 +00:00
url.rs Rename to url command to url build-query () 2023-01-15 10:16:29 -08:00
xlsx.rs Add date support in from xlsx () 2024-02-24 07:25:51 -06:00
xml.rs Add self-closed tag support for to xml () 2024-01-19 05:35:29 -06:00
yaml.rs Clean up tests containing unnecessary cwd: tokens () 2023-07-17 18:43:51 +02:00