1 // rustfmt-normalize_comments: true
2 // rustfmt-indent_style: Visual
3 // Test chain formatting.
6 // Don't put chains on a single line if it wasn't so in source.
11 bbbbbbbbbbbbbbbbbbb.ccccccccccccccccccccccccccccccccccccc
12 .ddddddddddddddddddddddddddd();
14 bbbbbbbbbbbbbbbbbbb.ccccccccccccccccccccccccccccccccccccc.ddddddddddddddddddddddddddd.eeeeeeee();
16 // Test case where first chain element isn't a path, but is shorter than
19 .y(|| match cond() { true => (), false => () });
22 .quux(move || if true {
28 some_fuuuuuuuuunction()
29 .method_call_a(aaaaa, bbbbb, |c| {
34 some_fuuuuuuuuunction().method_call_a(aaaaa, bbbbb, |c| {
37 }).method_call_b(aaaaa, bbbbb, |c| {
42 fffffffffffffffffffffffffffffffffff(a,
46 *root.borrow_mut() = Some(&script_task);
50 let suuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuum = xxxxxxx
53 .fold(0, |acc, x| acc + x);
55 aaaaaaaaaaaaaaaa.map(|x| {
58 }).filter(some_mod::some_filter)
70 }.method_call().method_call();
82 // params are 1-indexed
83 stack.push(mparams[match cur.to_digit(10) {
84 Some(d) => d as usize - 1,
85 None => return Err("bad param number".to_owned()),
92 if cond { some(); } else { none(); }
96 Foo { x: val } .baz(|| { force(); multiline(); }) .quux();
98 Foo { y: i_am_multi_line, z: ok }
100 force(); multiline();
104 a + match x { true => "yay!", false => "boo!" }.bar()
107 fn is_replaced_content() -> bool {
108 constellat.send(ConstellationMsg::ViewportConstrained(
109 self.id, constraints)).unwrap();
115 std::mem::transmute(dl.symbol::<()>("init").unwrap())
119 let names = String::from_utf8(names)?.split('|').map(str::to_owned).collect();
122 fn issue1217() -> Result<Mnemonic, Error> {
123 let random_chars: String = OsRng::new()?
125 .take(self.bit_length)
128 Ok(Mnemonic::new(&random_chars))
131 fn issue1236(options: Vec<String>) -> Result<Option<String>> {
132 let process = Command::new("dmenu").stdin(Stdio::piped())
133 .stdout(Stdio::piped())
135 .chain_err(|| "failed to spawn dmenu")?;
140 let prototype_id = PrototypeIdData::from_reader::<_, B>(&mut self.file_cursor).chain_err(|| {
141 format!("could not read prototype ID at offset {:#010x}",
151 if let a_very_very_very_very_very_very_very_very_long_variable =
152 compute_this_variable()