mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
16 lines
315 B
Rust
16 lines
315 B
Rust
|
#![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!());
|
||
|
}
|