2020-03-18 09:24:48 -05:00
|
|
|
#![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
|
2021-04-08 10:50:13 -05:00
|
|
|
#![allow(clippy::if_same_then_else, clippy::branches_sharing_code)]
|
2020-03-18 09:24:48 -05:00
|
|
|
|
|
|
|
fn test_nested() {
|
|
|
|
fn nested() {
|
|
|
|
let x = Some(());
|
|
|
|
if x.is_some() {
|
|
|
|
x.unwrap(); // unnecessary
|
|
|
|
} else {
|
|
|
|
x.unwrap(); // will panic
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|