mirror of
https://github.com/danog/parser.git
synced 2024-11-30 04:29:13 +01:00
all: clippy
This commit is contained in:
parent
2b2ec2253f
commit
e1fe663fc2
@ -103,7 +103,7 @@ impl Lexer {
|
|||||||
if !buffer.is_empty() {
|
if !buffer.is_empty() {
|
||||||
tokens.push(Token {
|
tokens.push(Token {
|
||||||
kind: TokenKind::InlineHtml(buffer),
|
kind: TokenKind::InlineHtml(buffer),
|
||||||
span: (self.line, self.col.checked_sub(5).unwrap_or(0)),
|
span: (self.line, self.col.saturating_sub(5)),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ impl Parser {
|
|||||||
Statement::Property { var }
|
Statement::Property { var }
|
||||||
},
|
},
|
||||||
s @ Statement::Method { .. } => s,
|
s @ Statement::Method { .. } => s,
|
||||||
_ => return Err(ParseError::InvalidClassStatement(format!("Classes can only contain properties, constants and methods."), self.current.span))
|
_ => return Err(ParseError::InvalidClassStatement("Classes can only contain properties, constants and methods.".to_string(), self.current.span))
|
||||||
};
|
};
|
||||||
|
|
||||||
body.push(statement);
|
body.push(statement);
|
||||||
|
Loading…
Reference in New Issue
Block a user