many clippy fixes

This commit is contained in:
Anton-4 2023-04-24 16:21:46 +02:00
parent 7bbb37a843
commit 9748e4a4dc
No known key found for this signature in database
GPG key ID: 0971D718C0A9B937
17 changed files with 455 additions and 600 deletions

View file

@ -103,13 +103,7 @@ impl<'a> Formattable for Expr<'a> {
}
}
fn format_with_options(
&self,
buf: &mut Buf,
parens: Parens,
newlines: Newlines,
indent: u16,
) {
fn format_with_options(&self, buf: &mut Buf, parens: Parens, newlines: Newlines, indent: u16) {
use self::Expr::*;
let apply_needs_parens = parens == Parens::InApply;
@ -704,12 +698,7 @@ fn fmt_binops<'a>(
loc_right_side.format_with_options(buf, Parens::InOperator, Newlines::Yes, indent);
}
fn format_spaces(
buf: &mut Buf,
spaces: &[CommentOrNewline],
newlines: Newlines,
indent: u16,
) {
fn format_spaces(buf: &mut Buf, spaces: &[CommentOrNewline], newlines: Newlines, indent: u16) {
match newlines {
Newlines::Yes => {
fmt_spaces(buf, spaces.iter(), indent);