nushell/tests/plugins
Stefan Holderbach 406df7f208
Avoid taking unnecessary ownership of intermediates (#12740)
# 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
..
formats Avoid taking unnecessary ownership of intermediates (#12740) 2024-05-04 00:53:15 +00:00
config.rs Merge stream_example into example plugin and clean up names (#12234) 2024-03-19 12:36:46 -05:00
core_inc.rs Avoid taking unnecessary ownership of intermediates (#12740) 2024-05-04 00:53:15 +00:00
custom_values.rs Fix deadlock on PluginCustomValue drop (#12418) 2024-04-05 21:57:00 -05:00
env.rs Merge stream_example into example plugin and clean up names (#12234) 2024-03-19 12:36:46 -05:00
mod.rs Rename plugin cache file ⇒ plugin registry file (#12634) 2024-04-24 17:40:39 -05:00
nu_plugin_nu_example.rs Deprecate register and add plugin use (#12607) 2024-04-23 06:37:50 -05:00
register.rs Change PluginCommand API to be more like Command (#12279) 2024-03-27 11:59:57 +01:00
registry_file.rs Avoid taking unnecessary ownership of intermediates (#12740) 2024-05-04 00:53:15 +00:00
stream.rs Merge stream_example into example plugin and clean up names (#12234) 2024-03-19 12:36:46 -05:00
stress_internals.rs Fix (and test) for a deadlock that can happen while waiting for protocol info (#12633) 2024-04-24 08:44:04 -05:00