mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
more clippy things
This commit is contained in:
parent
e30893b66e
commit
4db48d9f13
5 changed files with 5 additions and 5 deletions
|
@ -361,7 +361,7 @@ pub fn canonicalize_pattern<'a>(
|
||||||
|
|
||||||
// If we encountered an erroneous pattern (e.g. one with shadowing),
|
// If we encountered an erroneous pattern (e.g. one with shadowing),
|
||||||
// use the resulting RuntimeError. Otherwise, return a successful record destructure.
|
// use the resulting RuntimeError. Otherwise, return a successful record destructure.
|
||||||
opt_erroneous.unwrap_or_else(|| Pattern::RecordDestructure {
|
opt_erroneous.unwrap_or(Pattern::RecordDestructure {
|
||||||
whole_var,
|
whole_var,
|
||||||
ext_var,
|
ext_var,
|
||||||
destructs,
|
destructs,
|
||||||
|
|
|
@ -137,7 +137,7 @@ fn comments_or_new_lines_to_docs<'a>(
|
||||||
match comment_or_new_line {
|
match comment_or_new_line {
|
||||||
DocComment(doc_str) => {
|
DocComment(doc_str) => {
|
||||||
docs.push_str(doc_str);
|
docs.push_str(doc_str);
|
||||||
docs.push_str("\n");
|
docs.push('\n');
|
||||||
}
|
}
|
||||||
Newline | LineComment(_) => {}
|
Newline | LineComment(_) => {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1263,7 +1263,7 @@ fn patterns_to_when<'a>(
|
||||||
// Even if the body was Ok, replace it with this Err.
|
// Even if the body was Ok, replace it with this Err.
|
||||||
// If it was already an Err, leave it at that Err, so the first
|
// If it was already an Err, leave it at that Err, so the first
|
||||||
// RuntimeError we encountered remains the first.
|
// RuntimeError we encountered remains the first.
|
||||||
body = body.and_then(|_| {
|
body = body.and({
|
||||||
Err(Located {
|
Err(Located {
|
||||||
region: pattern.region,
|
region: pattern.region,
|
||||||
value,
|
value,
|
||||||
|
|
|
@ -342,7 +342,7 @@ fn parse_concrete_type<'a>(
|
||||||
//
|
//
|
||||||
// If we made it this far and don't have a next_char, then necessarily
|
// If we made it this far and don't have a next_char, then necessarily
|
||||||
// we have consumed a '.' char previously.
|
// we have consumed a '.' char previously.
|
||||||
return malformed(next_char.or_else(|| Some('.')), arena, state, parts);
|
return malformed(next_char.or(Some('.')), arena, state, parts);
|
||||||
}
|
}
|
||||||
|
|
||||||
if part_buf.is_empty() {
|
if part_buf.is_empty() {
|
||||||
|
|
|
@ -6,7 +6,7 @@ use libc::{c_void, size_t};
|
||||||
|
|
||||||
#[link(name = "alloca")]
|
#[link(name = "alloca")]
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#[no_mangle]
|
#[allow(dead_code)]
|
||||||
fn c_alloca(_: size_t) -> *mut c_void;
|
fn c_alloca(_: size_t) -> *mut c_void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue