Closed
Description
In #4386 the option_and_then_some
lint was added. This can also be implemented for result_and_then_ok
:
fn foo() -> Result<(), ()> {
let x = Ok(10);
x.and_then(Ok); // This is a noop -> `x`
x.and_then(|x| Some(..)); // This should be a `map` -> `x.map(|x| ..)`
}