Skip to content

Commit

Permalink
Fix 1.76 clippies (hyperledger-solang#1626)
Browse files Browse the repository at this point in the history
  • Loading branch information
xermicus authored Feb 29, 2024
1 parent b4728a4 commit 0bea68c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions solang-parser/src/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ impl<'input> fmt::Display for Token<'input> {
Token::StringLiteral(true, s) => write!(f, "unicode\"{s}\""),
Token::HexLiteral(hex) => write!(f, "{hex}"),
Token::AddressLiteral(address) => write!(f, "{address}"),
Token::Number(integer, exp) if exp.is_empty() => write!(f, "{integer}"),
Token::Number(integer, "") => write!(f, "{integer}"),
Token::Number(integer, exp) => write!(f, "{integer}e{exp}"),
Token::RationalNumber(integer, fraction, exp) if exp.is_empty() => {
Token::RationalNumber(integer, fraction, "") => {
write!(f, "{integer}.{fraction}")
}
Token::RationalNumber(integer, fraction, exp) => {
Expand Down
2 changes: 1 addition & 1 deletion src/bin/idl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ fn program_id(idl: &Idl) -> Option<&String> {
/// There are many keywords in Solidity which are not keywords in Rust, so they may
/// occur as field name, function name, etc. Rename those fields by prepending
/// underscores until unique
fn rename_keywords(name_map: &mut Vec<(String, String)>) {
fn rename_keywords(name_map: &mut [(String, String)]) {
for i in 0..name_map.len() {
let name = &name_map[i].0;

Expand Down

0 comments on commit 0bea68c

Please sign in to comment.