Fix clippy things

Copied from 4db48d9f13
This commit is contained in:
Pit Capitain 2020-11-19 23:08:19 +01:00
parent 2dee43a3ca
commit afb60974fe
5 changed files with 5 additions and 5 deletions

View File

@ -361,7 +361,7 @@ pub fn canonicalize_pattern<'a>(
// If we encountered an erroneous pattern (e.g. one with shadowing),
// 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,
ext_var,
destructs,

View File

@ -137,7 +137,7 @@ fn comments_or_new_lines_to_docs<'a>(
match comment_or_new_line {
DocComment(doc_str) => {
docs.push_str(doc_str);
docs.push_str("\n");
docs.push('\n');
}
Newline | LineComment(_) => {}
}

View File

@ -1263,7 +1263,7 @@ fn patterns_to_when<'a>(
// 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
// RuntimeError we encountered remains the first.
body = body.and_then(|_| {
body = body.and({
Err(Located {
region: pattern.region,
value,

View File

@ -342,7 +342,7 @@ fn parse_concrete_type<'a>(
//
// If we made it this far and don't have a next_char, then necessarily
// 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() {

View File

@ -6,7 +6,7 @@ use libc::{c_void, size_t};
#[link(name = "alloca")]
extern "C" {
#[no_mangle]
#[allow(dead_code)]
fn c_alloca(_: size_t) -> *mut c_void;
}