more clippy things

This commit is contained in:
Folkert 2020-11-07 01:17:50 +01:00
parent 332e4553bd
commit fc73679932
2 changed files with 18 additions and 16 deletions

View file

@ -151,14 +151,12 @@ impl Dependencies {
}
}
let output = MutSet::default();
// // all the dependencies can be loaded
// for dep in dependencies {
// output.insert((*dep, LoadHeader));
// }
output
MutSet::default()
}
/// 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>(
arena: &'a Bump,
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,
scope: &mut roc_can::scope::Scope,
effect_symbol: Symbol,

View file

@ -1358,7 +1358,7 @@ pub fn specialize_all<'a>(
let hash_the_thing = |x: &SolvedType| {
let mut hasher = DefaultHasher::new();
x.hash(&mut hasher);
(hasher.finish());
hasher.finish()
};
as_vec.sort_by_key(|x| hash_the_thing(x));
@ -1780,22 +1780,25 @@ fn build_specialized_proc<'a>(
// make sure there is not arg_closure argument without a closure layout
debug_assert!(pattern_symbols.last() != Some(&Symbol::ARG_CLOSURE));
let diff = pattern_layouts_len - pattern_symbols.len();
if diff == 0 {
use std::cmp::Ordering;
match pattern_layouts_len.cmp(&pattern_symbols.len()) {
Ordering::Greater => {
let proc_args = proc_args.into_bump_slice();
Ok((proc_args, None, ret_layout))
} else if diff > 0 {
}
Ordering::Less => {
// so far, the problem when hitting this branch was always somewhere else
// I think this branch should not be reachable in a bugfree compiler
panic!("more arguments (according to the layout) than argument symbols")
} else {
}
Ordering::Equal => {
panic!("more argument symbols than arguments (according to the layout)")
}
}
}
}
}
fn specialize<'a>(
env: &mut Env<'a, '_>,