Skip to content

Commit

Permalink
chore: fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
alixinne committed Aug 19, 2024
1 parent 4ed7678 commit e11c443
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lang-pp/src/lexer/glue/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,6 @@ impl Token {
impl From<crate::lexer::PreToken> for Token {
fn from(pre: crate::lexer::PreToken) -> Self {
// SAFETY: Token is a superset of PreToken
unsafe { std::mem::transmute(std::mem::transmute::<_, u16>(pre)) }
unsafe { std::mem::transmute(std::mem::transmute::<crate::lexer::PreToken, u16>(pre)) }
}
}
2 changes: 1 addition & 1 deletion lang-pp/src/parser/syntax_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ impl From<lexer::Token> for SyntaxKind {
}

// SAFETY: Aside from LINECONT, SyntaxKind is a superset of lexer::Token
unsafe { std::mem::transmute(std::mem::transmute::<_, u16>(s)) }
unsafe { std::mem::transmute(std::mem::transmute::<lexer::Token, u16>(s)) }
}
}

Expand Down
2 changes: 1 addition & 1 deletion lang-pp/src/processor/nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ impl TryFrom<(FileId, SyntaxNode)> for Extension {
.collect();

let name = idents
.get(0)
.first()
.ok_or(Self::Error::MissingExtensionName)
.map(|name| ExtensionName::new(Unescaped::new(name.text()).to_string()))?;

Expand Down

0 comments on commit e11c443

Please sign in to comment.