1
0
mirror of https://github.com/nushell/nushell.git synced 2025-03-22 11:37:10 +01:00
nushell/crates/nu-table/src
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
..
types Avoid taking unnecessary ownership of intermediates () 2024-05-04 00:53:15 +00:00
common.rs Add command_prelude module () 2024-03-26 21:17:30 +00:00
lib.rs Add an option to set header on border (style) () 2023-08-04 13:50:47 -05:00
table_theme.rs Update crates-ci/typos and fix new typos () 2023-09-11 12:37:06 +02:00
table.rs Use nightly clippy to kill dead code/fix style () 2024-03-30 09:17:28 +08:00
unstructured_table.rs Copy-on-write for record values () 2024-04-14 01:42:03 +00:00
util.rs nu-table: Fix expand table unnessary color in trail head config when wrap is used () 2023-09-15 11:44:53 -05:00