// Test case where first chain element isn't a path, but is shorter than
// the size of a tab.
x().y(|| match cond() {
- true => (),
- false => (),
- });
+ true => (),
+ false => (),
+ });
- loong_func().quux(move || {
- if true {
- 1
- } else {
- 2
- }
- });
+ loong_func().quux(move || if true {
+ 1
+ } else {
+ 2
+ });
some_fuuuuuuuuunction().method_call_a(aaaaa, bbbbb, |c| {
let x = c;
});
});
- let suuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuum =
- xxxxxxx.map(|x| x + 5)
- .map(|x| x / 2)
- .fold(0, |acc, x| acc + x);
+ let suuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuum = xxxxxxx.map(|x| x + 5)
+ .map(|x| x / 2)
+ .fold(0,
+ |acc, x| acc + x);
aaaaaaaaaaaaaaaa.map(|x| {
x += 1;
}
fn floaters() {
- let z = Foo {
- field1: val1,
- field2: val2,
- };
-
- let x = Foo {
- field1: val1,
- field2: val2,
- }.method_call()
+ let z = Foo { field1: val1,
+ field2: val2, };
+
+ let x = Foo { field1: val1,
+ field2: val2, }.method_call()
.method_call();
let y = if cond {
match x {
PushParam => {
// params are 1-indexed
- stack.push(
- mparams[match cur.to_digit(10) {
- Some(d) => d as usize - 1,
- None => return Err("bad param number".to_owned()),
- }].clone(),
- );
+ stack.push(mparams[match cur.to_digit(10) {
+ Some(d) => d as usize - 1,
+ None => return Err("bad param number".to_owned()),
+ }].clone());
}
}
}
})
.quux();
- Foo {
- y: i_am_multi_line,
- z: ok,
- }.baz(|| {
+ Foo { y: i_am_multi_line,
+ z: ok, }.baz(|| {
force();
multiline();
})
for _ in 0..100 {
let prototype_id =
PrototypeIdData::from_reader::<_, B>(&mut self.file_cursor).chain_err(|| {
- format!(
- "could not read prototype ID at offset {:#010x}",
- current_offset
- )
+ format!("could not read prototype ID at offset {:#010x}",
+ current_offset)
})?;
}
}
fn foo() {
Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(f(), b());
- Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(
- // Comment
- foo(), // Comment
- // Comment
- bar(), // Comment
- );
+ Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(// Comment
+ foo(), /* Comment */
+ // Comment
+ bar() /* Comment */);
Foo(Bar, f());
- Quux(
- if cond {
- bar();
- },
- baz(),
- );
+ Quux(if cond {
+ bar();
+ },
+ baz());
- Baz(
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
- zzzzz, // test
- );
+ Baz(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
+ zzzzz /* test */);
- A(
- // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit
- // amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante
- // hendrerit. Donec et mollis dolor.
- item(),
- // Praesent et diam eget libero egestas mattis sit amet vitae augue.
- // Nam tincidunt congue enim, ut porta lorem lacinia consectetur.
- Item,
- );
+ A(// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit
+ // amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante
+ // hendrerit. Donec et mollis dolor.
+ item(),
+ // Praesent et diam eget libero egestas mattis sit amet vitae augue.
+ // Nam tincidunt congue enim, ut porta lorem lacinia consectetur.
+ Item);
- Diagram(
- // o This graph demonstrates how
- // / \ significant whitespace is
- // o o preserved.
- // /|\ \
- // o o o o
- G,
- )
+ Diagram(// o This graph demonstrates how
+ // / \ significant whitespace is
+ // o o preserved.
+ // /|\ \
+ // o o o o
+ G)
}