mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-26 19:51:52 +03:00
clippy changes
This commit is contained in:
parent
550f43b039
commit
035f763d40
@ -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))
|
||||
|
@ -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()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user