mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
17 lines
327 B
Rust
17 lines
327 B
Rust
//@run-rustfix
|
|
|
|
#![warn(clippy::ignored_unit_patterns)]
|
|
#![allow(clippy::redundant_pattern_matching, clippy::single_match)]
|
|
|
|
fn foo() -> Result<(), ()> {
|
|
unimplemented!()
|
|
}
|
|
|
|
fn main() {
|
|
match foo() {
|
|
Ok(_) => {},
|
|
Err(_) => {},
|
|
}
|
|
if let Ok(_) = foo() {}
|
|
let _ = foo().map_err(|_| todo!());
|
|
}
|