1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-12-12 11:14:55 +02:00

Merge pull request #1512 from nmay231/main

fix(options3): panic when not matching to avoid false positives
This commit is contained in:
liv 2023-05-10 10:49:36 +02:00 committed by GitHub
commit b882da1ad4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ fn main() {
match y {
Some(p) => println!("Co-ordinates are {},{} ", p.x, p.y),
_ => println!("no match"),
_ => panic!("no match!"),
}
y; // Fix without deleting this line.
}