chore: clippy warnings

This commit is contained in:
rvcas 2023-01-09 18:03:32 -05:00 committed by Lucas
parent ce2de96226
commit 6ea9ad9c41
2 changed files with 2 additions and 2 deletions

View File

@ -375,7 +375,7 @@ fn constant_value_parser() -> impl Parser<Token, ast::UntypedConstant, Error = P
let constant_bytearray_hexstring_parser =
just(Token::Hash)
.ignore_then(select! {Token::String {value} => value}.validate(
|value, span, emit| match hex::decode(&value) {
|value, span, emit| match hex::decode(value) {
Ok(bytes) => bytes,
Err(_) => {
emit(ParseError::malformed_base16_string_literal(span));

View File

@ -1153,7 +1153,7 @@ impl<'a> CodeGenerator<'a> {
for (name, index) in names.clone() {
if let Some(defined_index) = defined_indices
.iter()
.find(|(defined_index, _)| *defined_index as usize == index)
.find(|(defined_index, _)| *defined_index == index)
{
previous_defined_names.push(defined_index.clone());
} else {