Skip to content

Commit 4fa2969

Browse files
committed
fixup tests
1 parent f9510a5 commit 4fa2969

File tree

10 files changed

+45
-53
lines changed

10 files changed

+45
-53
lines changed

tests/target/chains-visual.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ fn main() {
1515
// Test case where first chain element isn't a path, but is shorter than
1616
// the size of a tab.
1717
x().y(|| match cond() {
18-
true => (),
19-
false => (),
20-
});
18+
true => (),
19+
false => (),
20+
});
2121

2222
loong_func().quux(move || if true { 1 } else { 2 });
2323

2424
some_fuuuuuuuuunction().method_call_a(aaaaa, bbbbb, |c| {
25-
let x = c;
26-
x
27-
});
25+
let x = c;
26+
x
27+
});
2828

2929
some_fuuuuuuuuunction().method_call_a(aaaaa, bbbbb, |c| {
3030
let x = c;
@@ -59,7 +59,7 @@ fn floaters() {
5959

6060
let x = Foo { field1: val1,
6161
field2: val2, }.method_call()
62-
.method_call();
62+
.method_call();
6363

6464
let y = if cond { val1 } else { val2 }.method_call();
6565

@@ -80,7 +80,7 @@ fn floaters() {
8080
} else {
8181
none();
8282
}.bar()
83-
.baz();
83+
.baz();
8484

8585
Foo { x: val }.baz(|| {
8686
force();
@@ -90,10 +90,10 @@ fn floaters() {
9090

9191
Foo { y: i_am_multi_line,
9292
z: ok, }.baz(|| {
93-
force();
94-
multiline();
95-
})
96-
.quux();
93+
force();
94+
multiline();
95+
})
96+
.quux();
9797

9898
a + match x {
9999
true => "yay!",
@@ -137,9 +137,9 @@ fn issue1434() {
137137
for _ in 0..100 {
138138
let prototype_id =
139139
PrototypeIdData::from_reader::<_, B>(&mut self.file_cursor).chain_err(|| {
140-
format!("could not read prototype ID at offset {:#010x}",
141-
current_offset)
142-
})?;
140+
format!("could not read prototype ID at offset {:#010x}",
141+
current_offset)
142+
})?;
143143
}
144144
}
145145

tests/target/chains.rs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ fn main() {
3838
.method_call_a(aaaaa, bbbbb, |c| {
3939
let x = c;
4040
x
41-
})
42-
.method_call_b(aaaaa, bbbbb, |c| {
41+
}).method_call_b(aaaaa, bbbbb, |c| {
4342
let x = c;
4443
x
4544
});
@@ -65,8 +64,7 @@ fn main() {
6564
.map(|x| {
6665
x += 1;
6766
x
68-
})
69-
.filter(some_mod::some_filter)
67+
}).filter(some_mod::some_filter)
7068
}
7169

7270
fn floaters() {
@@ -79,7 +77,7 @@ fn floaters() {
7977
field1: val1,
8078
field2: val2,
8179
}.method_call()
82-
.method_call();
80+
.method_call();
8381

8482
let y = if cond {
8583
val1
@@ -106,24 +104,22 @@ fn floaters() {
106104
} else {
107105
none();
108106
}.bar()
109-
.baz();
107+
.baz();
110108

111109
Foo {
112110
x: val,
113111
}.baz(|| {
114112
force();
115113
multiline();
116-
})
117-
.quux();
114+
}).quux();
118115

119116
Foo {
120117
y: i_am_multi_line,
121118
z: ok,
122119
}.baz(|| {
123120
force();
124121
multiline();
125-
})
126-
.quux();
122+
}).quux();
127123

128124
a + match x {
129125
true => "yay!",
@@ -238,8 +234,7 @@ impl Foo {
238234
}
239235
}
240236
})
241-
})
242-
.collect();
237+
}).collect();
243238
}
244239
}
245240

tests/target/closure.rs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,20 @@ fn issue470() {
138138
{
139139
{
140140
{
141-
let explicit_arg_decls = explicit_arguments.into_iter().enumerate().map(
142-
|(index, (ty, pattern))| {
143-
let lvalue = Lvalue::Arg(index as u32);
144-
block = this.pattern(
145-
block,
146-
argument_extent,
147-
hair::PatternRef::Hair(pattern),
148-
&lvalue,
149-
);
150-
ArgDecl { ty: ty }
151-
},
152-
);
141+
let explicit_arg_decls =
142+
explicit_arguments
143+
.into_iter()
144+
.enumerate()
145+
.map(|(index, (ty, pattern))| {
146+
let lvalue = Lvalue::Arg(index as u32);
147+
block = this.pattern(
148+
block,
149+
argument_extent,
150+
hair::PatternRef::Hair(pattern),
151+
&lvalue,
152+
);
153+
ArgDecl { ty: ty }
154+
});
153155
}
154156
}
155157
}
@@ -169,8 +171,7 @@ fn issue1329() {
169171
.map(|x| {
170172
x += 1;
171173
x
172-
})
173-
.filter
174+
}).filter
174175
}
175176

176177
fn issue325() {

tests/target/configs/indent_style/block_call.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ impl Cursor {
117117
debug_assert_eq!(n, -1);
118118
None
119119
}
120-
})
121-
.or_else(|| {
120+
}).or_else(|| {
122121
let canonical = self.canonical();
123122
if canonical != *self {
124123
canonical.num_template_args()

tests/target/expr-block.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ fn issue_1450() {
141141
Relaxed,
142142
Release,
143143
Relaxed,
144-
)
145-
.is_ok()
144+
).is_ok()
146145
{
147146
return;
148147
}

tests/target/file-lines-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ fn floaters() {
55
field1: val1,
66
field2: val2,
77
}.method_call()
8-
.method_call();
8+
.method_call();
99

1010
let y = if cond {
1111
val1

tests/target/file-lines-3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ fn floaters() {
55
field1: val1,
66
field2: val2,
77
}.method_call()
8-
.method_call();
8+
.method_call();
99

1010
let y = if cond { val1 } else { val2 }.method_call();
1111

tests/target/issue-2759.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ fn bar() {}
5656
/// .boxed(),
5757
/// ]
5858
/// }).bind("127.0.0.1:8080")
59-
/// .unwrap()
60-
/// .run()
59+
/// .unwrap()
60+
/// .run()
6161
/// # });
6262
/// }
6363
/// ```

tests/target/macros.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,7 @@ fn issue_1885() {
183183
chan_select! {
184184
rx.recv() => {}
185185
}
186-
})
187-
.collect::<Vec<_>>();
186+
}).collect::<Vec<_>>();
188187
}
189188

190189
fn issue_1917() {

tests/target/match.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,7 @@ fn issue1456() {
381381
.iter()
382382
.map(|node| {
383383
XPathNodeReader::new(node, &context).and_then(|r| ArtistRef::from_xml(&r))
384-
})
385-
.collect();
384+
}).collect();
386385
res?
387386
}
388387
_ => Vec::new(),

0 commit comments

Comments
 (0)