Skip to content

Commit 16184d3

Browse files
committed
Cargo fmt and update a test
1 parent 0f5dcc6 commit 16184d3

File tree

8 files changed

+11
-36
lines changed

8 files changed

+11
-36
lines changed

src/checkstyle.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ where
5757
writer,
5858
"<error line=\"{}\" severity=\"warning\" message=\"Should be `{}`\" \
5959
/>",
60-
mismatch.line_number,
61-
message
60+
mismatch.line_number, message
6261
)?;
6362
}
6463
}

src/comment.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,7 @@ pub fn combine_strs_with_missing_comments(
205205
};
206206
Some(format!(
207207
"{}{}{}{}{}",
208-
prev_str,
209-
first_sep,
210-
missing_comment,
211-
second_sep,
212-
next_str,
208+
prev_str, first_sep, missing_comment, second_sep, next_str,
213209
))
214210
}
215211

src/config.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,7 @@ mod test {
714714
toml,
715715
format!(
716716
"merge_derives = {}\nskip_children = {}\n",
717-
merge_derives,
718-
skip_children,
717+
merge_derives, skip_children,
719718
)
720719
);
721720
}

src/expr.rs

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,7 @@ where
353353
if one_line_width <= shape.width {
354354
return Some(format!(
355355
"{}{}{}{}",
356-
lhs_result,
357-
pp.infix,
358-
rhs_result,
359-
pp.suffix
356+
lhs_result, pp.infix, rhs_result, pp.suffix
360357
));
361358
}
362359
}
@@ -390,10 +387,7 @@ where
390387
};
391388
Some(format!(
392389
"{}{}{}{}",
393-
lhs_result,
394-
infix_with_sep,
395-
rhs_result,
396-
pp.suffix
390+
lhs_result, infix_with_sep, rhs_result, pp.suffix
397391
))
398392
}
399393

@@ -883,10 +877,7 @@ impl<'a> ControlFlow<'a> {
883877

884878
let result = format!(
885879
"{} {} {{ {} }} else {{ {} }}",
886-
self.keyword,
887-
pat_expr_str,
888-
if_str,
889-
else_str
880+
self.keyword, pat_expr_str, if_str, else_str
890881
);
891882

892883
if result.len() <= width {
@@ -1589,10 +1580,7 @@ fn rewrite_match_body(
15891580

15901581
Some(format!(
15911582
"{} =>{}{}{}",
1592-
pats_str,
1593-
block_sep,
1594-
body_str,
1595-
body_suffix
1583+
pats_str, block_sep, body_str, body_suffix
15961584
))
15971585
};
15981586

src/items.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -844,9 +844,7 @@ fn rewrite_trait_ref(
844844
if !(retry && trait_ref_str.contains('\n')) {
845845
return Some(format!(
846846
"{} {}{}",
847-
generics_str,
848-
polarity_str,
849-
&trait_ref_str
847+
generics_str, polarity_str, &trait_ref_str
850848
));
851849
}
852850
}

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ impl fmt::Display for ErrorKind {
9393
ErrorKind::LineOverflow(found, maximum) => write!(
9494
fmt,
9595
"line exceeded maximum width (maximum: {}, found: {})",
96-
maximum,
97-
found
96+
maximum, found
9897
),
9998
ErrorKind::TrailingWhitespace => write!(fmt, "left behind trailing whitespace"),
10099
ErrorKind::BadIssue(issue) => write!(fmt, "found {}", issue),

src/types.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,7 @@ impl Rewrite for ast::WherePredicate {
442442
{
443443
format!(
444444
"for< {} > {}{}{}",
445-
lifetime_str,
446-
type_str,
447-
colon,
448-
bounds_str
445+
lifetime_str, type_str, colon, bounds_str
449446
)
450447
} else {
451448
format!("for<{}> {}{}{}", lifetime_str, type_str, colon, bounds_str)

tests/target/macros.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ fn issue_1279() {
135135
fn issue_1555() {
136136
let hello = &format!(
137137
"HTTP/1.1 200 OK\r\nServer: {}\r\n\r\n{}",
138-
"65454654654654654654654655464",
139-
"4"
138+
"65454654654654654654654655464", "4"
140139
);
141140
}
142141

0 commit comments

Comments
 (0)