mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-19 06:40:20 +03:00
redundant closure call
This commit is contained in:
parent
6d55acc5cf
commit
49c2b1dbb7
@ -1300,17 +1300,21 @@ mod debug_types {
|
||||
Arg,
|
||||
}
|
||||
|
||||
fn always_true() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
macro_rules! maybe_paren {
|
||||
($paren_if_above:expr, $my_prec:expr, $doc:expr) => {
|
||||
maybe_paren!($paren_if_above, $my_prec, || true, $doc)
|
||||
maybe_paren!($paren_if_above, $my_prec, always_true, $doc)
|
||||
};
|
||||
($paren_if_above:expr, $my_prec:expr, $extra_cond:expr, $doc:expr) => {
|
||||
($paren_if_above:expr, $my_prec:expr, $extra_cond:expr, $doc:expr) => {{
|
||||
if $my_prec > $paren_if_above && $extra_cond() {
|
||||
$doc.parens().group()
|
||||
} else {
|
||||
$doc
|
||||
}
|
||||
};
|
||||
}};
|
||||
}
|
||||
|
||||
fn typ<'a>(
|
||||
|
@ -90,6 +90,7 @@ macro_rules! section_impl {
|
||||
let mut bytes = Vec::<u8>::with_capacity_in(range.len() * 2, arena);
|
||||
*cursor = range.end;
|
||||
bytes.extend_from_slice(&module_bytes[range]);
|
||||
#[allow(clippy::redundant_closure_call)]
|
||||
Ok($from_count_and_bytes(count, bytes))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user