mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Clippy
This commit is contained in:
parent
097c5afc73
commit
5362ed1e6c
1 changed files with 3 additions and 1 deletions
|
@ -24,7 +24,7 @@ pub fn num_expr_from_result(
|
||||||
var_store.fresh(),
|
var_store.fresh(),
|
||||||
var_store.fresh(),
|
var_store.fresh(),
|
||||||
(*str).into(),
|
(*str).into(),
|
||||||
num.into(),
|
num,
|
||||||
bound,
|
bound,
|
||||||
),
|
),
|
||||||
Ok((str, ParsedNumResult::Float(num, bound))) => Expr::Float(
|
Ok((str, ParsedNumResult::Float(num, bound))) => Expr::Float(
|
||||||
|
@ -305,6 +305,7 @@ fn from_str_radix(
|
||||||
fn lower_bound_of_int(result: i128) -> IntWidth {
|
fn lower_bound_of_int(result: i128) -> IntWidth {
|
||||||
use IntWidth::*;
|
use IntWidth::*;
|
||||||
if result >= 0 {
|
if result >= 0 {
|
||||||
|
// Positive
|
||||||
let result = result as u128;
|
let result = result as u128;
|
||||||
if result > U64.max_value() {
|
if result > U64.max_value() {
|
||||||
I128
|
I128
|
||||||
|
@ -326,6 +327,7 @@ fn lower_bound_of_int(result: i128) -> IntWidth {
|
||||||
I8
|
I8
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// Negative
|
||||||
if result < I64.min_value() {
|
if result < I64.min_value() {
|
||||||
I128
|
I128
|
||||||
} else if result < I32.min_value() {
|
} else if result < I32.min_value() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue