Skip to content

Commit

Permalink
fix clippy lints introduced in 1.72 and 1.73 (#2581)
Browse files Browse the repository at this point in the history
  • Loading branch information
exrook authored Oct 22, 2023
1 parent 19209b6 commit 17dfdb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 2 additions & 5 deletions src/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ pub struct Handle<T> {

impl<T> Clone for Handle<T> {
fn clone(&self) -> Self {
Handle {
index: self.index,
marker: self.marker,
}
*self
}
}

Expand All @@ -60,7 +57,7 @@ impl<T> Eq for Handle<T> {}

impl<T> PartialOrd for Handle<T> {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
self.index.partial_cmp(&other.index)
Some(self.cmp(other))
}
}

Expand Down
4 changes: 1 addition & 3 deletions src/front/wgsl/parse/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,7 @@ impl<'a> Lexer<'a> {
&mut self,
) -> Result<(&'a str, Span), Error<'a>> {
match self.next() {
(Token::Word(word), span) if word == "_" => {
Err(Error::InvalidIdentifierUnderscore(span))
}
(Token::Word("_"), span) => Err(Error::InvalidIdentifierUnderscore(span)),
(Token::Word(word), span) if word.starts_with("__") => {
Err(Error::ReservedIdentifierPrefix(span))
}
Expand Down

0 comments on commit 17dfdb9

Please sign in to comment.