Invert &Options to Option<&T> (#10315)

Elide the reference for `Copy` type (`usize`)
Use the canonical deref where possible.
* `&Box` -> `&`
* `&String` -> `&str`
* `&PathBuf` -> `&Path`

Skips the ctrl-C handler for now.
This commit is contained in:
Stefan Holderbach
2023-09-13 01:00:58 +02:00
committed by GitHub
parent 3e14dc3eb8
commit a14e9e0a2e
24 changed files with 87 additions and 83 deletions

View File

@@ -45,7 +45,7 @@ impl CustomValue for PluginCustomValue {
&self,
span: nu_protocol::Span,
) -> Result<nu_protocol::Value, nu_protocol::ShellError> {
let mut plugin_cmd = create_command(&self.filename, &self.shell);
let mut plugin_cmd = create_command(&self.filename, self.shell.as_deref());
let mut child = plugin_cmd.spawn().map_err(|err| {
ShellError::GenericError(