We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aeb3496 commit 3b7a518Copy full SHA for 3b7a518
src/patterns.rs
@@ -133,7 +133,7 @@ impl Rewrite for Pat {
133
.iter()
134
.map(|p| {
135
if let Some(rw) = p.rewrite(context, shape) {
136
- format!("{}", if rw == "_" { "" } else { &rw })
+ rw
137
} else {
138
format!("{}", context.snippet(p.span))
139
}
tests/target/issue-3718.rs
@@ -0,0 +1,7 @@
1
+fn main() {
2
+ let x: &[i32] = &[2, 2];
3
+ match x {
4
+ [_a, _] => println!("Wrong username or password"),
5
+ _ => println!("Logged in"),
6
+ }
7
+}
0 commit comments