Closed
Description
This may be a duplicate of #4081, but I can't easily check since clippy isn't in the current nightly.
fn foo() -> Result<Vec<u8>, ()> {
Err(())
}
fn bar() -> Result<(), ()> {
for _ in foo()? {}
Ok(())
}
warning: identical conversion
--> src/main.rs:6:14
|
6 | for _ in foo()? {}
| ^^^^^^ help: consider removing `foo()?()`: `foo()?`
|
= note: #[warn(clippy::identity_conversion)] on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion
Metadata
Metadata
Assignees
Labels
No labels