Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 594774b

Browse files
committed
Update tests
1 parent 829dbfa commit 594774b

File tree

12 files changed

+70
-36
lines changed

12 files changed

+70
-36
lines changed

tests/target/chains.rs

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ fn main() {
3838
.method_call_a(aaaaa, bbbbb, |c| {
3939
let x = c;
4040
x
41-
}).method_call_b(aaaaa, bbbbb, |c| {
41+
})
42+
.method_call_b(aaaaa, bbbbb, |c| {
4243
let x = c;
4344
x
4445
});
@@ -55,7 +56,8 @@ fn main() {
5556
body.fold(Body::new(), |mut body, chunk| {
5657
body.extend(chunk);
5758
Ok(body)
58-
}).and_then(move |body| {
59+
})
60+
.and_then(move |body| {
5961
let req = Request::from_parts(parts, body);
6062
f(req).map_err(|_| io::Error::new(io::ErrorKind::Other, ""))
6163
});
@@ -64,7 +66,8 @@ fn main() {
6466
.map(|x| {
6567
x += 1;
6668
x
67-
}).filter(some_mod::some_filter)
69+
})
70+
.filter(some_mod::some_filter)
6871
}
6972

7073
fn floaters() {
@@ -76,24 +79,27 @@ fn floaters() {
7679
let x = Foo {
7780
field1: val1,
7881
field2: val2,
79-
}.method_call()
82+
}
83+
.method_call()
8084
.method_call();
8185

8286
let y = if cond {
8387
val1
8488
} else {
8589
val2
86-
}.method_call();
90+
}
91+
.method_call();
8792

8893
{
8994
match x {
9095
PushParam => {
9196
// params are 1-indexed
9297
stack.push(
9398
mparams[match cur.to_digit(10) {
94-
Some(d) => d as usize - 1,
95-
None => return Err("bad param number".to_owned()),
96-
}].clone(),
99+
Some(d) => d as usize - 1,
100+
None => return Err("bad param number".to_owned()),
101+
}]
102+
.clone(),
97103
);
98104
}
99105
}
@@ -103,28 +109,34 @@ fn floaters() {
103109
some();
104110
} else {
105111
none();
106-
}.bar()
112+
}
113+
.bar()
107114
.baz();
108115

109116
Foo {
110117
x: val,
111-
}.baz(|| {
118+
}
119+
.baz(|| {
112120
force();
113121
multiline();
114-
}).quux();
122+
})
123+
.quux();
115124

116125
Foo {
117126
y: i_am_multi_line,
118127
z: ok,
119-
}.baz(|| {
128+
}
129+
.baz(|| {
120130
force();
121131
multiline();
122-
}).quux();
132+
})
133+
.quux();
123134

124135
a + match x {
125136
true => "yay!",
126137
false => "boo!",
127-
}.bar()
138+
}
139+
.bar()
128140
}
129141

130142
fn is_replaced_content() -> bool {
@@ -184,7 +196,8 @@ fn issue1392() {
184196
else {
185197
b();
186198
}
187-
"#.trim(),
199+
"#
200+
.trim(),
188201
);
189202
}
190203

@@ -234,7 +247,8 @@ impl Foo {
234247
}
235248
}
236249
})
237-
}).collect();
250+
})
251+
.collect();
238252
}
239253
}
240254

@@ -247,19 +261,23 @@ fn issue2415() {
247261
Ok((|| {
248262
// stuff
249263
Some(value.to_string())
250-
})().ok_or("")?)
251-
})().unwrap_or_else(|_: Box<::std::error::Error>| String::from(""));
264+
})()
265+
.ok_or("")?)
266+
})()
267+
.unwrap_or_else(|_: Box<::std::error::Error>| String::from(""));
252268
}
253269

254270
impl issue_2786 {
255271
fn thing(&self) {
256272
foo(|a| {
257273
println!("a");
258274
println!("b");
259-
}).bar(|c| {
275+
})
276+
.bar(|c| {
260277
println!("a");
261278
println!("b");
262-
}).baz(|c| {
279+
})
280+
.baz(|c| {
263281
println!("a");
264282
println!("b");
265283
})
@@ -271,10 +289,12 @@ fn issue_2773() {
271289
bar.or_else(|| {
272290
// do stuff
273291
None
274-
}).or_else(|| {
292+
})
293+
.or_else(|| {
275294
// do other stuff
276295
None
277-
}).and_then(|val| {
296+
})
297+
.and_then(|val| {
278298
// do this stuff
279299
None
280300
});

tests/target/closure.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ fn issue1329() {
171171
.map(|x| {
172172
x += 1;
173173
x
174-
}).filter
174+
})
175+
.filter
175176
}
176177

177178
fn issue325() {

tests/target/configs/indent_style/block_call.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ fn issue1420() {
6161
# Getting started
6262
...
6363
"#,
64-
).running(waltz)
64+
)
65+
.running(waltz)
6566
}
6667

6768
// #1563
@@ -117,7 +118,8 @@ impl Cursor {
117118
debug_assert_eq!(n, -1);
118119
None
119120
}
120-
}).or_else(|| {
121+
})
122+
.or_else(|| {
121123
let canonical = self.canonical();
122124
if canonical != *self {
123125
canonical.num_template_args()

tests/target/expr-block.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ fn issue_1450() {
141141
Relaxed,
142142
Release,
143143
Relaxed,
144-
).is_ok()
144+
)
145+
.is_ok()
145146
{
146147
return;
147148
}

tests/target/file-lines-1.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ fn floaters() {
44
let x = Foo {
55
field1: val1,
66
field2: val2,
7-
}.method_call()
7+
}
8+
.method_call()
89
.method_call();
910

1011
let y = if cond {

tests/target/file-lines-3.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ fn floaters() {
44
let x = Foo {
55
field1: val1,
66
field2: val2,
7-
}.method_call()
7+
}
8+
.method_call()
89
.method_call();
910

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

tests/target/issue-1681.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ fn foo() {
1616
Ok(entry.insert(try!(statement)))
1717
}
1818
}
19-
}).map(MaybeCached::Cached)
19+
})
20+
.map(MaybeCached::Cached)
2021
}

tests/target/issue-2759.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ fn bar() {}
5555
/// .resource("/", |r| r.f(|r| HttpResponse::Ok()))
5656
/// .boxed(),
5757
/// ]
58-
/// }).bind("127.0.0.1:8080")
58+
/// })
59+
/// .bind("127.0.0.1:8080")
5960
/// .unwrap()
6061
/// .run()
6162
/// # });

tests/target/issue-2896.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ fn main() {
5252
assert!(row_sum_a > 0);
5353
(item_b, (item_a, num_cooccurrences, row_sum_a))
5454
},
55-
).join_map(
55+
)
56+
.join_map(
5657
&row_sums,
5758
|&item_b, &(item_a, num_cooccurrences, row_sum_a), &row_sum_b| {
5859
assert!(row_sum_a > 0);
@@ -159,5 +160,6 @@ fn main() {
159160
worker.step();
160161
}
161162
}
162-
}).unwrap();
163+
})
164+
.unwrap();
163165
}

tests/target/macros.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ fn issue1739() {
173173
..,
174174
init_size[1] - extreeeeeeeeeeeeeeeeeeeeeeeem..init_size[1],
175175
..
176-
]).par_map_inplace(|el| *el = 0.);
176+
])
177+
.par_map_inplace(|el| *el = 0.);
177178
}
178179

179180
fn issue_1885() {
@@ -183,7 +184,8 @@ fn issue_1885() {
183184
chan_select! {
184185
rx.recv() => {}
185186
}
186-
}).collect::<Vec<_>>();
187+
})
188+
.collect::<Vec<_>>();
187189
}
188190

189191
fn issue_1917() {

tests/target/match.rs

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

tests/target/nested-visual-block.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ fn main() {
2929
expr.rewrite(
3030
inner_context,
3131
&Constraints::new(try_opt!(v_budget.checked_sub(2)), indent + 2),
32-
).map(|s| format!("..{}", s))
32+
)
33+
.map(|s| format!("..{}", s))
3334
}
3435
}
3536
},

0 commit comments

Comments
 (0)