Skip to content

Commit 2915167

Browse files
committed
Cargo fmt and update tests
1 parent b12fecb commit 2915167

6 files changed

+8
-16
lines changed

src/file_lines.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,7 @@ impl FileLines {
167167
}
168168

169169
/// `FileLines` files iterator.
170-
pub struct Files<'a>(
171-
Option<::std::collections::hash_map::Keys<'a, String, Vec<Range>>>,
172-
);
170+
pub struct Files<'a>(Option<::std::collections::hash_map::Keys<'a, String, Vec<Range>>>);
173171

174172
impl<'a> iter::Iterator for Files<'a> {
175173
type Item = &'a String;

tests/source/configs-fn_call_style-block-trailing-comma.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
// rustfmt should not add trailing comma when rewriting macro. See #1528.
55
fn a() {
66
panic!("this is a long string that goes past the maximum line length causing rustfmt to insert a comma here:");
7-
foo(oooptoptoptoptptooptoptoptoptptooptoptoptoptptoptoptoptoptpt());
7+
foo(a, oooptoptoptoptptooptoptoptoptptooptoptoptoptptoptoptoptoptpt());
88
}

tests/target/configs-fn_call_style-block-trailing-comma.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ fn a() {
77
"this is a long string that goes past the maximum line length causing rustfmt to insert a comma here:"
88
);
99
foo(
10+
a,
1011
oooptoptoptoptptooptoptoptoptptooptoptoptoptptoptoptoptoptpt(),
1112
);
1213
}

tests/target/enum.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,6 @@ enum Loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
170170

171171
// #1046
172172
pub enum Entry<'a, K: 'a, V: 'a> {
173-
Vacant(
174-
#[stable(feature = "rust1", since = "1.0.0")] VacantEntry<'a, K, V>,
175-
),
176-
Occupied(
177-
#[stable(feature = "rust1", since = "1.0.0")] OccupiedEntry<'a, K, V>,
178-
),
173+
Vacant(#[stable(feature = "rust1", since = "1.0.0")] VacantEntry<'a, K, V>),
174+
Occupied(#[stable(feature = "rust1", since = "1.0.0")] OccupiedEntry<'a, K, V>),
179175
}

tests/target/expr-block.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,7 @@ fn combine_block() {
307307
};
308308

309309
match x {
310-
y => func(
311-
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
312-
),
310+
y => func(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx),
313311
_ => func(
314312
x,
315313
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy,

tests/target/string-lit.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ formatting"#;
2525

2626
filename.replace(" ", "\\");
2727

28-
let xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx = funktion(
29-
"yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
30-
);
28+
let xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx =
29+
funktion("yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy");
3130

3231
let unicode = "a̐éö̲\r\n";
3332
let unicode2 = "Löwe 老虎 Léopard";

0 commit comments

Comments
 (0)