Improve the match_same_arms
doc
This commit is contained in:
parent
45bb75bee2
commit
8bfe38c432
1 changed files with 3 additions and 1 deletions
|
@ -38,7 +38,9 @@ declare_lint! {
|
||||||
|
|
||||||
/// **What it does:** This lint checks for `match` with identical arm bodies.
|
/// **What it does:** This lint checks for `match` with identical arm bodies.
|
||||||
///
|
///
|
||||||
/// **Why is this bad?** This is probably a copy & paste error.
|
/// **Why is this bad?** This is probably a copy & paste error. If arm bodies are the same on
|
||||||
|
/// purpose, you can factor them
|
||||||
|
/// [using `|`](https://doc.rust-lang.org/book/patterns.html#multiple-patterns).
|
||||||
///
|
///
|
||||||
/// **Known problems:** Hopefully none.
|
/// **Known problems:** Hopefully none.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in a new issue