mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-03 01:49:47 +00:00
20 lines
433 B
Rust
20 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();
|
||
|
}
|