mirror of
https://github.com/nushell/nushell
synced 2024-12-29 14:33:13 +00:00
Clippy fixes
This commit is contained in:
parent
1c52919103
commit
1296100d31
1 changed files with 2 additions and 8 deletions
|
@ -71,7 +71,7 @@ pub fn parse_def(
|
||||||
named: vec![],
|
named: vec![],
|
||||||
});
|
});
|
||||||
|
|
||||||
let call = if let Some(name_span) = spans.get(1) {
|
if let Some(name_span) = spans.get(1) {
|
||||||
let (name_expr, err) = parse_string(working_set, *name_span);
|
let (name_expr, err) = parse_string(working_set, *name_span);
|
||||||
error = error.or(err);
|
error = error.or(err);
|
||||||
|
|
||||||
|
@ -142,8 +142,6 @@ pub fn parse_def(
|
||||||
))
|
))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
call
|
|
||||||
} else {
|
} else {
|
||||||
let err_span = Span {
|
let err_span = Span {
|
||||||
start: name_span.end,
|
start: name_span.end,
|
||||||
|
@ -152,8 +150,6 @@ pub fn parse_def(
|
||||||
|
|
||||||
error = error
|
error = error
|
||||||
.or_else(|| Some(ParseError::MissingPositional("parameters".into(), err_span)));
|
.or_else(|| Some(ParseError::MissingPositional("parameters".into(), err_span)));
|
||||||
|
|
||||||
call
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let err_span = Span {
|
let err_span = Span {
|
||||||
|
@ -167,9 +163,7 @@ pub fn parse_def(
|
||||||
err_span,
|
err_span,
|
||||||
))
|
))
|
||||||
});
|
});
|
||||||
|
}
|
||||||
call
|
|
||||||
};
|
|
||||||
|
|
||||||
(
|
(
|
||||||
Statement::Pipeline(Pipeline::from_vec(vec![Expression {
|
Statement::Pipeline(Pipeline::from_vec(vec![Expression {
|
||||||
|
|
Loading…
Reference in a new issue