rust update, nix update, clippy fixes

This commit is contained in:
Anton-4 2023-04-22 14:51:01 +02:00
parent 32fcb38a94
commit e784baccce
No known key found for this signature in database
GPG key ID: 0971D718C0A9B937
37 changed files with 289 additions and 244 deletions

View file

@ -103,9 +103,9 @@ impl<'a> Formattable for Expr<'a> {
}
}
fn format_with_options<'buf>(
fn format_with_options(
&self,
buf: &mut Buf<'buf>,
buf: &mut Buf,
parens: Parens,
newlines: Newlines,
indent: u16,
@ -551,7 +551,7 @@ fn starts_with_newline(expr: &Expr) -> bool {
}
}
fn format_str_segment<'a, 'buf>(seg: &StrSegment<'a>, buf: &mut Buf<'buf>, indent: u16) {
fn format_str_segment(seg: &StrSegment, buf: &mut Buf, indent: u16) {
use StrSegment::*;
match seg {
@ -614,7 +614,7 @@ fn push_op(buf: &mut Buf, op: BinOp) {
}
}
pub fn fmt_str_literal<'buf>(buf: &mut Buf<'buf>, literal: StrLiteral, indent: u16) {
pub fn fmt_str_literal(buf: &mut Buf, literal: StrLiteral, indent: u16) {
use roc_parse::ast::StrLiteral::*;
match literal {
@ -673,8 +673,8 @@ pub fn fmt_str_literal<'buf>(buf: &mut Buf<'buf>, literal: StrLiteral, indent: u
}
}
fn fmt_binops<'a, 'buf>(
buf: &mut Buf<'buf>,
fn fmt_binops<'a>(
buf: &mut Buf,
lefts: &'a [(Loc<Expr<'a>>, Loc<BinOp>)],
loc_right_side: &'a Loc<Expr<'a>>,
part_of_multi_line_binops: bool,
@ -704,9 +704,9 @@ fn fmt_binops<'a, 'buf>(
loc_right_side.format_with_options(buf, Parens::InOperator, Newlines::Yes, indent);
}
fn format_spaces<'a, 'buf>(
buf: &mut Buf<'buf>,
spaces: &[CommentOrNewline<'a>],
fn format_spaces(
buf: &mut Buf,
spaces: &[CommentOrNewline],
newlines: Newlines,
indent: u16,
) {
@ -738,8 +738,8 @@ fn is_when_patterns_multiline(when_branch: &WhenBranch) -> bool {
is_multiline_patterns
}
fn fmt_when<'a, 'buf>(
buf: &mut Buf<'buf>,
fn fmt_when<'a>(
buf: &mut Buf,
loc_condition: &'a Loc<Expr<'a>>,
branches: &[&'a WhenBranch<'a>],
indent: u16,
@ -920,8 +920,8 @@ fn fmt_when<'a, 'buf>(
}
}
fn fmt_dbg<'a, 'buf>(
buf: &mut Buf<'buf>,
fn fmt_dbg<'a>(
buf: &mut Buf,
condition: &'a Loc<Expr<'a>>,
continuation: &'a Loc<Expr<'a>>,
is_multiline: bool,
@ -947,8 +947,8 @@ fn fmt_dbg<'a, 'buf>(
continuation.format(buf, indent);
}
fn fmt_expect<'a, 'buf>(
buf: &mut Buf<'buf>,
fn fmt_expect<'a>(
buf: &mut Buf,
condition: &'a Loc<Expr<'a>>,
continuation: &'a Loc<Expr<'a>>,
is_multiline: bool,
@ -974,8 +974,8 @@ fn fmt_expect<'a, 'buf>(
continuation.format(buf, indent);
}
fn fmt_if<'a, 'buf>(
buf: &mut Buf<'buf>,
fn fmt_if<'a>(
buf: &mut Buf,
branches: &'a [(Loc<Expr<'a>>, Loc<Expr<'a>>)],
final_else: &'a Loc<Expr<'a>>,
is_multiline: bool,
@ -1123,8 +1123,8 @@ fn fmt_if<'a, 'buf>(
final_else.format(buf, return_indent);
}
fn fmt_closure<'a, 'buf>(
buf: &mut Buf<'buf>,
fn fmt_closure<'a>(
buf: &mut Buf,
loc_patterns: &'a [Loc<Pattern<'a>>],
loc_ret: &'a Loc<Expr<'a>>,
indent: u16,
@ -1224,8 +1224,8 @@ fn fmt_closure<'a, 'buf>(
}
}
fn fmt_backpassing<'a, 'buf>(
buf: &mut Buf<'buf>,
fn fmt_backpassing<'a>(
buf: &mut Buf,
loc_patterns: &'a [Loc<Pattern<'a>>],
loc_body: &'a Loc<Expr<'a>>,
loc_ret: &'a Loc<Expr<'a>>,
@ -1312,8 +1312,8 @@ fn pattern_needs_parens_when_backpassing(pat: &Pattern) -> bool {
}
}
fn fmt_record<'a, 'buf>(
buf: &mut Buf<'buf>,
fn fmt_record<'a>(
buf: &mut Buf,
update: Option<&'a Loc<Expr<'a>>>,
fields: Collection<'a, Loc<AssignedField<'a, Expr<'a>>>>,
indent: u16,
@ -1404,9 +1404,9 @@ fn fmt_record<'a, 'buf>(
}
}
fn format_field_multiline<'a, 'buf, T>(
buf: &mut Buf<'buf>,
field: &AssignedField<'a, T>,
fn format_field_multiline<T>(
buf: &mut Buf,
field: &AssignedField<T>,
indent: u16,
separator_prefix: &str,
) where