Closed chachaleo closed 1 month ago
Finds patterns that reimplement Option::expect.
Concise code helps focusing on behavior instead of boilerplate.
let foo: Option::<i32> = Option::None; let _foo = match foo { Option::Some(x) => x, Option::None => core::panic_with_felt252('err'), };
Use instead :
let foo: Option::<i32> = Option::None; let _foo = foo.expect('err');
What it does
Finds patterns that reimplement Option::expect.
Why is this bad?
Concise code helps focusing on behavior instead of boilerplate.
Example
Use instead :