]>
Commit | Line | Data |
---|---|---|
f20569fa XL |
1 | error: `if` chain can be rewritten with `match` |
2 | --> $DIR/comparison_chain.rs:14:5 | |
3 | | | |
4 | LL | / if x > y { | |
5 | LL | | a() | |
6 | LL | | } else if x < y { | |
7 | LL | | b() | |
8 | LL | | } | |
9 | | |_____^ | |
10 | | | |
11 | = note: `-D clippy::comparison-chain` implied by `-D warnings` | |
12 | = help: consider rewriting the `if` chain to use `cmp` and `match` | |
13 | ||
14 | error: `if` chain can be rewritten with `match` | |
15 | --> $DIR/comparison_chain.rs:27:5 | |
16 | | | |
17 | LL | / if x > y { | |
18 | LL | | a() | |
19 | LL | | } else if x < y { | |
20 | LL | | b() | |
21 | LL | | } else { | |
22 | LL | | c() | |
23 | LL | | } | |
24 | | |_____^ | |
25 | | | |
26 | = help: consider rewriting the `if` chain to use `cmp` and `match` | |
27 | ||
28 | error: `if` chain can be rewritten with `match` | |
29 | --> $DIR/comparison_chain.rs:35:5 | |
30 | | | |
31 | LL | / if x > y { | |
32 | LL | | a() | |
33 | LL | | } else if y > x { | |
34 | LL | | b() | |
35 | LL | | } else { | |
36 | LL | | c() | |
37 | LL | | } | |
38 | | |_____^ | |
39 | | | |
40 | = help: consider rewriting the `if` chain to use `cmp` and `match` | |
41 | ||
42 | error: `if` chain can be rewritten with `match` | |
43 | --> $DIR/comparison_chain.rs:43:5 | |
44 | | | |
45 | LL | / if x > 1 { | |
46 | LL | | a() | |
47 | LL | | } else if x < 1 { | |
48 | LL | | b() | |
49 | LL | | } else if x == 1 { | |
50 | LL | | c() | |
51 | LL | | } | |
52 | | |_____^ | |
53 | | | |
54 | = help: consider rewriting the `if` chain to use `cmp` and `match` | |
55 | ||
56 | error: `if` chain can be rewritten with `match` | |
57 | --> $DIR/comparison_chain.rs:117:5 | |
58 | | | |
59 | LL | / if x > y { | |
60 | LL | | a() | |
61 | LL | | } else if x < y { | |
62 | LL | | b() | |
63 | LL | | } | |
64 | | |_____^ | |
65 | | | |
66 | = help: consider rewriting the `if` chain to use `cmp` and `match` | |
67 | ||
68 | error: `if` chain can be rewritten with `match` | |
69 | --> $DIR/comparison_chain.rs:123:5 | |
70 | | | |
71 | LL | / if x > y { | |
72 | LL | | a() | |
73 | LL | | } else if x < y { | |
74 | LL | | b() | |
75 | LL | | } else { | |
76 | LL | | c() | |
77 | LL | | } | |
78 | | |_____^ | |
79 | | | |
80 | = help: consider rewriting the `if` chain to use `cmp` and `match` | |
81 | ||
82 | error: `if` chain can be rewritten with `match` | |
83 | --> $DIR/comparison_chain.rs:131:5 | |
84 | | | |
85 | LL | / if x > y { | |
86 | LL | | a() | |
87 | LL | | } else if y > x { | |
88 | LL | | b() | |
89 | LL | | } else { | |
90 | LL | | c() | |
91 | LL | | } | |
92 | | |_____^ | |
93 | | | |
94 | = help: consider rewriting the `if` chain to use `cmp` and `match` | |
95 | ||
96 | error: aborting due to 7 previous errors | |
97 |