mirror of
https://github.com/nushell/nushell
synced 2024-12-30 15:03:25 +00:00
Cleanup; Remove redundant UTF-8 check
This commit is contained in:
parent
78256b4923
commit
b5329fe4ec
1 changed files with 1 additions and 19 deletions
|
@ -1697,26 +1697,8 @@ pub fn parse_import_pattern(
|
||||||
) -> (ImportPattern, Option<ParseError>) {
|
) -> (ImportPattern, Option<ParseError>) {
|
||||||
let mut error = None;
|
let mut error = None;
|
||||||
|
|
||||||
// return (
|
|
||||||
// ImportPattern {
|
|
||||||
// head: vec![],
|
|
||||||
// members: vec![],
|
|
||||||
// },
|
|
||||||
// Some(ParseError::MissingImportPattern(span)),
|
|
||||||
// );
|
|
||||||
|
|
||||||
// return (
|
|
||||||
// ImportPattern {
|
|
||||||
// head: vec![],
|
|
||||||
// members: vec![],
|
|
||||||
// },
|
|
||||||
// Some(ParseError::WrongImportPattern(span)),
|
|
||||||
// );
|
|
||||||
|
|
||||||
let head = if let Some(head_span) = spans.get(0) {
|
let head = if let Some(head_span) = spans.get(0) {
|
||||||
let (head_expr, err) = parse_string(working_set, *head_span);
|
working_set.get_span_contents(*head_span).to_vec()
|
||||||
error = error.or(err);
|
|
||||||
working_set.get_span_contents(head_expr.span).to_vec()
|
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
ImportPattern {
|
ImportPattern {
|
||||||
|
|
Loading…
Reference in a new issue