rust-clippy/tests/ui/unnecessary_literal_unwrap.rs
2023-06-12 16:19:26 +01:00

10 lines
189 B
Rust

#![warn(clippy::unnecessary_literal_unwrap)]
fn unwrap_option() {
let val = Some(1).unwrap();
let val = Some(1).expect("this never happens");
}
fn main() {
unwrap_option();
}