forked from extern/nushell
Invert &Option
s 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:
committed by
GitHub
parent
3e14dc3eb8
commit
a14e9e0a2e
@ -3595,13 +3595,14 @@ pub fn parse_register(working_set: &mut StateWorkingSet, spans: &[Span]) -> Pipe
|
||||
|
||||
let signatures = signature.map_or_else(
|
||||
|| {
|
||||
let signatures = get_signature(&path, &shell, ¤t_envs).map_err(|err| {
|
||||
ParseError::LabeledError(
|
||||
"Error getting signatures".into(),
|
||||
err.to_string(),
|
||||
spans[0],
|
||||
)
|
||||
});
|
||||
let signatures =
|
||||
get_signature(&path, shell.as_deref(), ¤t_envs).map_err(|err| {
|
||||
ParseError::LabeledError(
|
||||
"Error getting signatures".into(),
|
||||
err.to_string(),
|
||||
spans[0],
|
||||
)
|
||||
});
|
||||
|
||||
if signatures.is_ok() {
|
||||
// mark plugins file as dirty only when the user is registering plugins
|
||||
|
Reference in New Issue
Block a user