rust-clippy/tests/ui/match_option_and_default.fixed
2024-03-10 01:15:23 +01:00

19 lines
433 B
Rust

#![warn(clippy::match_option_and_default)]
#![allow(clippy::unnecessary_literal_unwrap)]
fn main() {
let x: Option<Vec<String>> = None;
x.unwrap_or_default();
let x: Option<Vec<String>> = None;
x.unwrap_or_default();
let x: Option<String> = None;
x.unwrap_or_default();
let x: Option<Vec<String>> = None;
x.unwrap_or_default();
let x: Option<Vec<String>> = None;
x.unwrap_or_default();
}