Closed 0xLucqs closed 1 month ago
Hi @0xLucqs can I help out with this?
Hey @JoE11-y! Thanks for showing interest. We've created an application for you to contribute to Cairo lint. Go check it out on OnlyDust!
@JoE11-y sure, do you have any idea on how to solve this ?
I am applying to this issue via OnlyDust platform.
Hello, Can I work on this task? I will be glad if this task is assigned to me.
@JoE11-y sure, do you have any idea on how to solve this ?
Yes I can. Will take reference from here.
https://rust-lang.github.io/rust-clippy/master/index.html#/manual_unwrap_or_default
Plus I have extensive XP working with Cairo.
Hi @0xLucqs I'd like to hop into this issue if still available. I'd use the clippy and given examples as a reference to see how it should behave/work and also I already have the exp on this project with the collapsible_if_else issue i solved before.
Hey @lindsaymoralesb! Thanks for showing interest. We've created an application for you to contribute to Cairo lint. Go check it out on OnlyDust!
I am applying to this issue via OnlyDust platform.
I have contributed to a lot of projects in Starknet, I have experience in Rust
Read the code base and merged PR and implement in a similar way
okay @JoE11-y i'll assign the issue to you
@chachaleo @lindsaymoralesb @Benjtalkshow i'll create other issues for you
What it does
Checks if a match or if let expression can be simplified using .unwrap_or_default().
Why is this bad?
It can be done in one call with .unwrap_or_default().
Example
Use instead:
(the examples are for arrays but it can work with any type that implements default