mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Fix GLSL frontend clippy error
This commit is contained in:
committed by
Dzmitry Malyshau
parent
bfeab40c8d
commit
f0f8a5f3ba
@@ -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"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ fn version() {
|
||||
value: TokenValue::Unknown(PreprocessorError::UnexpectedHash),
|
||||
meta: SourceMetadata { start: 24, end: 25 }
|
||||
},
|
||||
vec![ExpectedToken::EOF]
|
||||
vec![ExpectedToken::Eof]
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user