mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 13:43:17 +00:00
10 lines
189 B
Rust
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();
|
|
}
|