Cleanup; Remove redundant UTF-8 check

This commit is contained in:
Jakub Žádník 2021-10-27 00:34:39 +03:00
parent 78256b4923
commit b5329fe4ec

View file

@ -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 {