]> git.lizzy.rs Git - rust.git/blob - tests/target/configs-control_style-rfc.rs
5e19681f90bbbceb909270bbdc917dcef4e08c02
[rust.git] / tests / target / configs-control_style-rfc.rs
1 // rustfmt-indent_style: Block
2
3 // #1618
4 fn main() {
5     loop {
6         if foo {
7             if ((right_paddle_speed < 0.) && (right_paddle.position().y - paddle_size.y / 2. > 5.))
8                 || ((right_paddle_speed > 0.)
9                     && (right_paddle.position().y + paddle_size.y / 2. < game_height as f32 - 5.))
10             {
11                 foo
12             }
13             if ai_timer.elapsed_time().as_microseconds() > ai_time.as_microseconds() {
14                 if ball.position().y + ball_radius > right_paddle.position().y + paddle_size.y / 2.
15                 {
16                     foo
17                 }
18             }
19         }
20     }
21 }
22
23 fn issue1656() {
24     {
25         {
26             match rewrite {
27                 Some(ref body_str)
28                     if (!body_str.contains('\n') && body_str.len() <= arm_shape.width)
29                         || !context.config.wrap_match_arms()
30                         || (extend && first_line_width(body_str) <= arm_shape.width)
31                         || is_block =>
32                 {
33                     return None;
34                 }
35                 _ => {}
36             }
37         }
38     }
39 }