mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
more clippy things
This commit is contained in:
parent
332e4553bd
commit
fc73679932
2 changed files with 18 additions and 16 deletions
|
@ -151,14 +151,12 @@ impl Dependencies {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let output = MutSet::default();
|
|
||||||
|
|
||||||
// // all the dependencies can be loaded
|
// // all the dependencies can be loaded
|
||||||
// for dep in dependencies {
|
// for dep in dependencies {
|
||||||
// output.insert((*dep, LoadHeader));
|
// output.insert((*dep, LoadHeader));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
output
|
MutSet::default()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Propagate a notification, return (module, phase) pairs that can make progress
|
/// Propagate a notification, return (module, phase) pairs that can make progress
|
||||||
|
@ -1761,6 +1759,7 @@ fn find_task<T>(local: &Worker<T>, global: &Injector<T>, stealers: &[Stealer<T>]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
fn parse_header<'a>(
|
fn parse_header<'a>(
|
||||||
arena: &'a Bump,
|
arena: &'a Bump,
|
||||||
read_file_duration: Duration,
|
read_file_duration: Duration,
|
||||||
|
@ -2119,7 +2118,7 @@ fn run_solve<'a>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn fabricate_effect_after<'a>(
|
fn fabricate_effect_after(
|
||||||
env: &mut roc_can::env::Env,
|
env: &mut roc_can::env::Env,
|
||||||
scope: &mut roc_can::scope::Scope,
|
scope: &mut roc_can::scope::Scope,
|
||||||
effect_symbol: Symbol,
|
effect_symbol: Symbol,
|
||||||
|
|
|
@ -1358,7 +1358,7 @@ pub fn specialize_all<'a>(
|
||||||
let hash_the_thing = |x: &SolvedType| {
|
let hash_the_thing = |x: &SolvedType| {
|
||||||
let mut hasher = DefaultHasher::new();
|
let mut hasher = DefaultHasher::new();
|
||||||
x.hash(&mut hasher);
|
x.hash(&mut hasher);
|
||||||
(hasher.finish());
|
hasher.finish()
|
||||||
};
|
};
|
||||||
|
|
||||||
as_vec.sort_by_key(|x| hash_the_thing(x));
|
as_vec.sort_by_key(|x| hash_the_thing(x));
|
||||||
|
@ -1780,21 +1780,24 @@ fn build_specialized_proc<'a>(
|
||||||
// make sure there is not arg_closure argument without a closure layout
|
// make sure there is not arg_closure argument without a closure layout
|
||||||
debug_assert!(pattern_symbols.last() != Some(&Symbol::ARG_CLOSURE));
|
debug_assert!(pattern_symbols.last() != Some(&Symbol::ARG_CLOSURE));
|
||||||
|
|
||||||
let diff = pattern_layouts_len - pattern_symbols.len();
|
use std::cmp::Ordering;
|
||||||
|
match pattern_layouts_len.cmp(&pattern_symbols.len()) {
|
||||||
if diff == 0 {
|
Ordering::Greater => {
|
||||||
let proc_args = proc_args.into_bump_slice();
|
let proc_args = proc_args.into_bump_slice();
|
||||||
|
|
||||||
Ok((proc_args, None, ret_layout))
|
Ok((proc_args, None, ret_layout))
|
||||||
} else if diff > 0 {
|
}
|
||||||
|
Ordering::Less => {
|
||||||
// so far, the problem when hitting this branch was always somewhere else
|
// so far, the problem when hitting this branch was always somewhere else
|
||||||
// I think this branch should not be reachable in a bugfree compiler
|
// I think this branch should not be reachable in a bugfree compiler
|
||||||
panic!("more arguments (according to the layout) than argument symbols")
|
panic!("more arguments (according to the layout) than argument symbols")
|
||||||
} else {
|
}
|
||||||
|
Ordering::Equal => {
|
||||||
panic!("more argument symbols than arguments (according to the layout)")
|
panic!("more argument symbols than arguments (according to the layout)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn specialize<'a>(
|
fn specialize<'a>(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue