Modification of manual_ok_or to avoid fixing code incorrectly
Incorrect behaviour modified :
this :
fn main() {
let foo: Option<i32> = Option::None;
let other_val = 0;
let _foo = match foo {
Option::Some(_) => Result::Ok(other_val),
Option::None => Result::Err('this is an err'),
};
}
was incorrectly fixed to this :
fn main() {
let foo: Option<i32> = Option::None;
let other_val = 0;
let _foo = foo.ok_or('this is an err')
}
manual_ok
andmanual_err
lintsmanual_ok_or
to avoid fixing code incorrectlyIncorrect behaviour modified :
this :
was incorrectly fixed to this :