1 // rustfmt-indent_style: Visual
2 // Test chain formatting.
5 // Don't put chains on a single line if it wasn't so in source.
10 bbbbbbbbbbbbbbbbbbb.ccccccccccccccccccccccccccccccccccccc
11 .ddddddddddddddddddddddddddd();
13 bbbbbbbbbbbbbbbbbbb.ccccccccccccccccccccccccccccccccccccc.ddddddddddddddddddddddddddd.eeeeeeee();
15 // Test case where first chain element isn't a path, but is shorter than
18 .y(|| match cond() { true => (), false => () });
21 .quux(move || if true {
27 some_fuuuuuuuuunction()
28 .method_call_a(aaaaa, bbbbb, |c| {
33 some_fuuuuuuuuunction().method_call_a(aaaaa, bbbbb, |c| {
36 }).method_call_b(aaaaa, bbbbb, |c| {
41 fffffffffffffffffffffffffffffffffff(a,
45 *root.borrow_mut() = Some(&script_task);
49 let suuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuum = xxxxxxx
52 .fold(0, |acc, x| acc + x);
54 aaaaaaaaaaaaaaaa.map(|x| {
57 }).filter(some_mod::some_filter)
69 }.method_call().method_call();
81 // params are 1-indexed
82 stack.push(mparams[match cur.to_digit(10) {
83 Some(d) => d as usize - 1,
84 None => return Err("bad param number".to_owned()),
91 if cond { some(); } else { none(); }
95 Foo { x: val } .baz(|| { force(); multiline(); }) .quux();
97 Foo { y: i_am_multi_line, z: ok }
103 a + match x { true => "yay!", false => "boo!" }.bar()
106 fn is_replaced_content() -> bool {
107 constellat.send(ConstellationMsg::ViewportConstrained(
108 self.id, constraints)).unwrap();
114 std::mem::transmute(dl.symbol::<()>("init").unwrap())
118 let names = String::from_utf8(names)?.split('|').map(str::to_owned).collect();
121 fn issue1217() -> Result<Mnemonic, Error> {
122 let random_chars: String = OsRng::new()?
124 .take(self.bit_length)
127 Ok(Mnemonic::new(&random_chars))
130 fn issue1236(options: Vec<String>) -> Result<Option<String>> {
131 let process = Command::new("dmenu").stdin(Stdio::piped())
132 .stdout(Stdio::piped())
134 .chain_err(|| "failed to spawn dmenu")?;
139 let prototype_id = PrototypeIdData::from_reader::<_, B>(&mut self.file_cursor).chain_err(|| {
140 format!("could not read prototype ID at offset {:#010x}",
150 if let a_very_very_very_very_very_very_very_very_long_variable =
151 compute_this_variable()