18 lines
331 B
Rust
18 lines
331 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!());
|
||
|
}
|