]> git.lizzy.rs Git - rust.git/blob - src/docs/redundant_pattern.txt
[Arithmetic] Consider literals
[rust.git] / src / docs / redundant_pattern.txt
1 ### What it does
2 Checks for patterns in the form `name @ _`.
3
4 ### Why is this bad?
5 It's almost always more readable to just use direct
6 bindings.
7
8 ### Example
9 ```
10 match v {
11     Some(x) => (),
12     y @ _ => (),
13 }
14 ```
15
16 Use instead:
17 ```
18 match v {
19     Some(x) => (),
20     y => (),
21 }
22 ```