mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Silence a few clippy warnings
The map_entry one is important; it seems there's no way to write this using entry where it's actually correct.
This commit is contained in:
parent
153eb4f804
commit
9c6b6f7e25
1 changed files with 3 additions and 0 deletions
|
@ -116,6 +116,7 @@ impl<'a> Procs<'a> {
|
|||
.unwrap_or_else(|err| panic!("TODO turn fn_var into a RuntimeError {:?}", err));
|
||||
|
||||
// if we've already specialized this one, no further work is needed.
|
||||
#[allow(clippy::map_entry)]
|
||||
if !self.specialized.contains_key(&(symbol, layout.clone())) {
|
||||
let pending = PendingSpecialization {
|
||||
ret_var,
|
||||
|
@ -411,6 +412,7 @@ fn num_argument_to_int_or_float(subs: &Subs, var: Variable) -> IntOrFloat {
|
|||
/// foo = \r -> when r is { x } -> body
|
||||
///
|
||||
/// conversion of one-pattern when expressions will do the most optimal thing
|
||||
#[allow(clippy::type_complexity)]
|
||||
fn patterns_to_when<'a>(
|
||||
env: &mut Env<'a, '_>,
|
||||
patterns: std::vec::Vec<(Variable, Located<roc_can::pattern::Pattern>)>,
|
||||
|
@ -1529,6 +1531,7 @@ pub fn specialize_all<'a>(
|
|||
for (layout, pending) in by_layout.drain() {
|
||||
// If we've already seen this (Symbol, Layout) combination before,
|
||||
// don't try to specialize it again. If we do, we'll loop forever!
|
||||
#[allow(clippy::map_entry)]
|
||||
if !procs.specialized.contains_key(&(name, layout.clone())) {
|
||||
// TODO should pending_procs hold a Rc<Proc>?
|
||||
let partial_proc = procs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue