]> git.lizzy.rs Git - rust.git/blob - tests/source/configs-fn_call_style-block.rs
Fix weird indentaion in chain
[rust.git] / tests / source / configs-fn_call_style-block.rs
1 // rustfmt-fn_call_style: Block
2 // Function call style
3
4 fn main() {
5     lorem("lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit");
6     // #1501
7     let hyper = Arc::new(Client::with_connector(HttpsConnector::new(TlsClient::new())));
8 }
9
10 // #1521
11 impl Foo {
12     fn map_pixel_to_coords(&self, point: &Vector2i, view: &View) -> Vector2f {
13         unsafe {
14             Vector2f::from_raw(ffi::sfRenderTexture_mapPixelToCoords(self.render_texture, point.raw(), view.raw()))
15         }
16     }
17 }
18
19 fn issue1420() {
20     given(
21         r#"
22         # Getting started
23         ...
24     "#,
25     )
26         .running(waltz)
27 }
28
29 // #1563
30 fn query(conn: &Connection) -> Result<()> {
31     conn.query_row(
32         r#"
33             SELECT title, date
34             FROM posts,
35             WHERE DATE(date) = $1
36         "#,
37         &[],
38         |row| {
39             Post {
40                 title: row.get(0),
41                 date: row.get(1),
42             }
43         },
44     )?;
45
46     Ok(())
47 }