clippy changes

This commit is contained in:
evan-schott 2023-08-25 10:07:42 -07:00
parent 550f43b039
commit 035f763d40
2 changed files with 2 additions and 6 deletions

View File

@ -162,11 +162,7 @@ impl<'a> ParserContext<'a> {
self.bump();
// Reject value if the length is over 2 and the first character is 0
if (value.len() > 1 && value.starts_with('0')) || value.contains('_') {
return Err(ParserError::tuple_index_must_be_whole_number(
&self.token.token,
self.token.span,
)
.into());
return Err(ParserError::tuple_index_must_be_whole_number(&self.token.token, self.token.span).into());
}
Ok((PositiveNumber { value }, self.prev_token.span))

View File

@ -308,7 +308,7 @@ impl<'a> StatementVisitor<'a> for TypeChecker<'a> {
(Some(Value::U64(lower_bound, _)), Some(Value::U64(upper_bound, _))) => lower_bound >= upper_bound,
(Some(Value::U128(lower_bound, _)), Some(Value::U128(upper_bound, _))) => lower_bound >= upper_bound,
// Note that type mismatch and non-literal errors will already be emitted by here.
_ => false
_ => false,
} {
self.emit_err(TypeCheckerError::loop_range_decreasing(input.stop.span()));
}