Skip to content

Commit

Permalink
Appease rust 1.79 clippies (#1651)
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Young <[email protected]>
  • Loading branch information
seanyoung committed Jun 18, 2024
1 parent d8c5d24 commit 08dbe49
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
5 changes: 1 addition & 4 deletions solang-parser/src/solidity.lalrpop
Original file line number Diff line number Diff line change
Expand Up @@ -761,10 +761,7 @@ FunctionDefinition: Box<FunctionDefinition> = {
params,
attributes,
return_not_returns: None,
returns: match returns {
Some((returns, _)) => returns,
None => Vec::new(),
},
returns: returns.map(|(v, _)| v).unwrap_or_default(),
body,
})
},
Expand Down
4 changes: 2 additions & 2 deletions src/bin/languageserver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2774,8 +2774,8 @@ impl LanguageServer for SolangServer {
character: 0,
},
end: Position {
line: u32::max_value(),
character: u32::max_value(),
line: u32::MAX,
character: u32::MAX,
},
},
new_text: source_formatted,
Expand Down
4 changes: 2 additions & 2 deletions src/sema/expression/strings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ pub(super) fn get_digits(input: &mut std::str::CharIndices, len: usize) -> Resul
}
offset = match input.next() {
Some((i, _)) => i,
None => std::usize::MAX,
None => usize::MAX,
};
} else {
offset = std::usize::MAX;
offset = usize::MAX;
}

return Err(offset);
Expand Down
1 change: 1 addition & 0 deletions src/sema/yul/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use crate::Target;
use phf::{phf_map, phf_set};
use std::fmt;

#[allow(unused)]
pub struct YulBuiltinPrototype {
pub name: &'static str,
pub no_args: u8,
Expand Down
2 changes: 1 addition & 1 deletion tests/solana.rs
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ fn sol_try_find_program_address(

println!("program_id:{}", program_id.to_base58());

let bump_seed = [std::u8::MAX];
let bump_seed = [u8::MAX];
let mut seeds_with_bump = seeds.to_vec();
seeds_with_bump.push(&bump_seed);

Expand Down

0 comments on commit 08dbe49

Please sign in to comment.