mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
clippy
This commit is contained in:
parent
83953b0bba
commit
f522d28a00
3 changed files with 23 additions and 23 deletions
|
@ -4473,7 +4473,7 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
||||||
match op {
|
match op {
|
||||||
ListMap { xs } => {
|
ListMap { xs } => {
|
||||||
// List.map : List before, (before -> after) -> List after
|
// List.map : List before, (before -> after) -> List after
|
||||||
let (list, list_layout) = load_symbol_and_layout(scope, &xs);
|
let (list, list_layout) = load_symbol_and_layout(scope, xs);
|
||||||
|
|
||||||
let (function, closure, closure_layout) = function_details!();
|
let (function, closure, closure_layout) = function_details!();
|
||||||
|
|
||||||
|
@ -4501,8 +4501,8 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ListMap2 { xs, ys } => {
|
ListMap2 { xs, ys } => {
|
||||||
let (list1, list1_layout) = load_symbol_and_layout(scope, &xs);
|
let (list1, list1_layout) = load_symbol_and_layout(scope, xs);
|
||||||
let (list2, list2_layout) = load_symbol_and_layout(scope, &ys);
|
let (list2, list2_layout) = load_symbol_and_layout(scope, ys);
|
||||||
|
|
||||||
let (function, closure, closure_layout) = function_details!();
|
let (function, closure, closure_layout) = function_details!();
|
||||||
|
|
||||||
|
@ -4541,9 +4541,9 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ListMap3 { xs, ys, zs } => {
|
ListMap3 { xs, ys, zs } => {
|
||||||
let (list1, list1_layout) = load_symbol_and_layout(scope, &xs);
|
let (list1, list1_layout) = load_symbol_and_layout(scope, xs);
|
||||||
let (list2, list2_layout) = load_symbol_and_layout(scope, &ys);
|
let (list2, list2_layout) = load_symbol_and_layout(scope, ys);
|
||||||
let (list3, list3_layout) = load_symbol_and_layout(scope, &zs);
|
let (list3, list3_layout) = load_symbol_and_layout(scope, zs);
|
||||||
|
|
||||||
let (function, closure, closure_layout) = function_details!();
|
let (function, closure, closure_layout) = function_details!();
|
||||||
|
|
||||||
|
@ -4587,10 +4587,10 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ListMap4 { xs, ys, zs, ws } => {
|
ListMap4 { xs, ys, zs, ws } => {
|
||||||
let (list1, list1_layout) = load_symbol_and_layout(scope, &xs);
|
let (list1, list1_layout) = load_symbol_and_layout(scope, xs);
|
||||||
let (list2, list2_layout) = load_symbol_and_layout(scope, &ys);
|
let (list2, list2_layout) = load_symbol_and_layout(scope, ys);
|
||||||
let (list3, list3_layout) = load_symbol_and_layout(scope, &zs);
|
let (list3, list3_layout) = load_symbol_and_layout(scope, zs);
|
||||||
let (list4, list4_layout) = load_symbol_and_layout(scope, &ws);
|
let (list4, list4_layout) = load_symbol_and_layout(scope, ws);
|
||||||
|
|
||||||
let (function, closure, closure_layout) = function_details!();
|
let (function, closure, closure_layout) = function_details!();
|
||||||
|
|
||||||
|
@ -4649,7 +4649,7 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
||||||
}
|
}
|
||||||
ListMapWithIndex { xs } => {
|
ListMapWithIndex { xs } => {
|
||||||
// List.mapWithIndex : List before, (Nat, before -> after) -> List after
|
// List.mapWithIndex : List before, (Nat, before -> after) -> List after
|
||||||
let (list, list_layout) = load_symbol_and_layout(scope, &xs);
|
let (list, list_layout) = load_symbol_and_layout(scope, xs);
|
||||||
|
|
||||||
let (function, closure, closure_layout) = function_details!();
|
let (function, closure, closure_layout) = function_details!();
|
||||||
|
|
||||||
|
@ -4678,7 +4678,7 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
||||||
}
|
}
|
||||||
ListKeepIf { xs } => {
|
ListKeepIf { xs } => {
|
||||||
// List.keepIf : List elem, (elem -> Bool) -> List elem
|
// List.keepIf : List elem, (elem -> Bool) -> List elem
|
||||||
let (list, list_layout) = load_symbol_and_layout(scope, &xs);
|
let (list, list_layout) = load_symbol_and_layout(scope, xs);
|
||||||
|
|
||||||
let (function, closure, closure_layout) = function_details!();
|
let (function, closure, closure_layout) = function_details!();
|
||||||
|
|
||||||
|
@ -4704,7 +4704,7 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
||||||
}
|
}
|
||||||
ListKeepOks { xs } => {
|
ListKeepOks { xs } => {
|
||||||
// List.keepOks : List before, (before -> Result after *) -> List after
|
// List.keepOks : List before, (before -> Result after *) -> List after
|
||||||
let (list, list_layout) = load_symbol_and_layout(scope, &xs);
|
let (list, list_layout) = load_symbol_and_layout(scope, xs);
|
||||||
|
|
||||||
let (function, closure, closure_layout) = function_details!();
|
let (function, closure, closure_layout) = function_details!();
|
||||||
|
|
||||||
|
@ -4744,7 +4744,7 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
||||||
}
|
}
|
||||||
ListKeepErrs { xs } => {
|
ListKeepErrs { xs } => {
|
||||||
// List.keepErrs : List before, (before -> Result * after) -> List after
|
// List.keepErrs : List before, (before -> Result * after) -> List after
|
||||||
let (list, list_layout) = load_symbol_and_layout(scope, &xs);
|
let (list, list_layout) = load_symbol_and_layout(scope, xs);
|
||||||
|
|
||||||
let (function, closure, closure_layout) = function_details!();
|
let (function, closure, closure_layout) = function_details!();
|
||||||
|
|
||||||
|
@ -4793,7 +4793,7 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
||||||
}
|
}
|
||||||
ListSortWith { xs } => {
|
ListSortWith { xs } => {
|
||||||
// List.sortWith : List a, (a, a -> Ordering) -> List a
|
// List.sortWith : List a, (a, a -> Ordering) -> List a
|
||||||
let (list, list_layout) = load_symbol_and_layout(scope, &xs);
|
let (list, list_layout) = load_symbol_and_layout(scope, xs);
|
||||||
|
|
||||||
let (function, closure, closure_layout) = function_details!();
|
let (function, closure, closure_layout) = function_details!();
|
||||||
|
|
||||||
|
@ -4831,7 +4831,7 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ListAny { xs } => {
|
ListAny { xs } => {
|
||||||
let (list, list_layout) = load_symbol_and_layout(scope, &xs);
|
let (list, list_layout) = load_symbol_and_layout(scope, xs);
|
||||||
let (function, closure, closure_layout) = function_details!();
|
let (function, closure, closure_layout) = function_details!();
|
||||||
|
|
||||||
match list_layout {
|
match list_layout {
|
||||||
|
@ -4855,7 +4855,7 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ListFindUnsafe { xs } => {
|
ListFindUnsafe { xs } => {
|
||||||
let (list, list_layout) = load_symbol_and_layout(scope, &xs);
|
let (list, list_layout) = load_symbol_and_layout(scope, xs);
|
||||||
|
|
||||||
let (function, closure, closure_layout) = function_details!();
|
let (function, closure, closure_layout) = function_details!();
|
||||||
|
|
||||||
|
@ -4886,8 +4886,8 @@ fn run_higher_order_low_level<'a, 'ctx, 'env>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DictWalk { xs, state } => {
|
DictWalk { xs, state } => {
|
||||||
let (dict, dict_layout) = load_symbol_and_layout(scope, &xs);
|
let (dict, dict_layout) = load_symbol_and_layout(scope, xs);
|
||||||
let (default, default_layout) = load_symbol_and_layout(scope, &state);
|
let (default, default_layout) = load_symbol_and_layout(scope, state);
|
||||||
|
|
||||||
let (function, closure, closure_layout) = function_details!();
|
let (function, closure, closure_layout) = function_details!();
|
||||||
|
|
||||||
|
|
|
@ -6596,7 +6596,7 @@ fn call_by_name_help<'a>(
|
||||||
let call = self::Call {
|
let call = self::Call {
|
||||||
call_type: CallType::ByName {
|
call_type: CallType::ByName {
|
||||||
name: proc_name,
|
name: proc_name,
|
||||||
ret_layout: ret_layout,
|
ret_layout,
|
||||||
arg_layouts: argument_layouts,
|
arg_layouts: argument_layouts,
|
||||||
specialization_id: env.next_call_specialization_id(),
|
specialization_id: env.next_call_specialization_id(),
|
||||||
},
|
},
|
||||||
|
@ -6637,7 +6637,7 @@ fn call_by_name_help<'a>(
|
||||||
let call = self::Call {
|
let call = self::Call {
|
||||||
call_type: CallType::ByName {
|
call_type: CallType::ByName {
|
||||||
name: proc_name,
|
name: proc_name,
|
||||||
ret_layout: ret_layout,
|
ret_layout,
|
||||||
arg_layouts: argument_layouts,
|
arg_layouts: argument_layouts,
|
||||||
specialization_id: env.next_call_specialization_id(),
|
specialization_id: env.next_call_specialization_id(),
|
||||||
},
|
},
|
||||||
|
@ -6691,7 +6691,7 @@ fn call_by_name_help<'a>(
|
||||||
let call = self::Call {
|
let call = self::Call {
|
||||||
call_type: CallType::ByName {
|
call_type: CallType::ByName {
|
||||||
name: proc_name,
|
name: proc_name,
|
||||||
ret_layout: ret_layout,
|
ret_layout,
|
||||||
arg_layouts: argument_layouts,
|
arg_layouts: argument_layouts,
|
||||||
specialization_id: env.next_call_specialization_id(),
|
specialization_id: env.next_call_specialization_id(),
|
||||||
},
|
},
|
||||||
|
|
|
@ -444,7 +444,7 @@ mod test_parse {
|
||||||
#[quickcheck]
|
#[quickcheck]
|
||||||
fn all_f64_values_parse(num: f64) {
|
fn all_f64_values_parse(num: f64) {
|
||||||
let string = num.to_string();
|
let string = num.to_string();
|
||||||
if string.contains(".") {
|
if string.contains('.') {
|
||||||
assert_parses_to(&string, Float(&string));
|
assert_parses_to(&string, Float(&string));
|
||||||
} else if num.is_nan() {
|
} else if num.is_nan() {
|
||||||
assert_parses_to(&string, Expr::GlobalTag(&string));
|
assert_parses_to(&string, Expr::GlobalTag(&string));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue