Fix GLSL frontend clippy error

This commit is contained in:
Dzmitry Malyshau authored and Dzmitry Malyshau committed 2021-06-18 20:18:52 -04:00
1 parent bfeab40c8d
commit f0f8a5f3ba
3 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -26,7 +26,7 @@ pub enum ExpectedToken {
IntLiteral,
FloatLiteral,
BoolLiteral,
EOF,
Eof,
}
impl From<TokenValue> for ExpectedToken {
fn from(token: TokenValue) -> Self {
@@ -42,7 +42,7 @@ impl std::fmt::Display for ExpectedToken {
ExpectedToken::IntLiteral => write!(f, "integer literal"),
ExpectedToken::FloatLiteral => write!(f, "float literal"),
ExpectedToken::BoolLiteral => write!(f, "bool literal"),
ExpectedToken::EOF => write!(f, "end of file"),
ExpectedToken::Eof => write!(f, "end of file"),
}
}
}
+2 -2
View File
@@ -427,8 +427,8 @@ impl<'source, 'program, 'options> Parser<'source, 'program, 'options> {
TokenValue::Semicolon if self.program.version == 460 => Ok(()),
_ => {
let expected = match self.program.version {
460 => vec![TokenValue::Semicolon.into(), ExpectedToken::EOF],
_ => vec![ExpectedToken::EOF],
460 => vec![TokenValue::Semicolon.into(), ExpectedToken::Eof],
_ => vec![ExpectedToken::Eof],
};
Err(ErrorKind::InvalidToken(token, expected))
}
+1 -1
View File
@@ -56,7 +56,7 @@ fn version() {
value: TokenValue::Unknown(PreprocessorError::UnexpectedHash),
meta: SourceMetadata { start: 24, end: 25 }
},
vec![ExpectedToken::EOF]
vec![ExpectedToken::Eof]
)
);