Open 0xLucqs opened 2 months ago
hey @Benjtalkshow wanna try this one ?
Hey @SridharVadla45! Thanks for showing interest. We've created an application for you to contribute to Cairo lint. Go check it out on OnlyDust!
sure any idea on how to proceed ?
Hi @0xLucqs, can i try this.
first i m going to identify which structs in Cairo support is_empty. Once identified, I’ll implement the logic to catch those cases and suggest fixes. Lastly, I’ll write some tests.
Hey @BernalHQ! Thanks for showing interest. We've created an application for you to contribute to Cairo lint. Go check it out on OnlyDust!
Hey @BernalHQ can you pick another issue plz (or if @SridharVadla45 doesn’t answer in the coming days you can take it)
Ok, i going to looking another issue, and i can do It, if dont answer It.
I am applying to this issue via OnlyDust platform.
Ive been leaning rust for the past year and looking to get a good first issue
Hey @0xLucqs is this one available? If so, may I work on this! :D
Hey @lauchaves! 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.
Hi @0xLucqs, is there an opportunity for me to work on this project again? I previously worked on it and would love to contribute further.
Hey @0xLucqs, I’d love to take a look at this too.
I am applying to this issue via OnlyDust platform.
I am an enthusiastic self-taught developer, that learnt Rust as my first language. With hands-on experience optimizing gas usage in projects like Node Guardians exercises (thinking in cairo, brainfvckvm). Which helped me learn how to write optimized code
As I have already reviewed the codebase, I would first create a linting rule that flags these comparisons and suggests using .is_empty() instead, and then test to ensure the rule correctly identifies and suggests improvements.
Hi @0xLucqs , please can I be assigned please? This would be my first time contributing to this repo and I’d love to be given the opportunity.
Hey @od-hunter! Thanks for showing interest. We've created an application for you to contribute to Cairo lint. Go check it out on OnlyDust!
hey @Benjtalkshow wanna try this one ?
Hey @0xLucqs I can handle the issue. I wanna try it
did anyone start anything ? In case no i this issue will be paused
did anyone start anything ? In case no i this issue will be paused
Hey @0xLucqs , I already started working on it. Should i continue?
can you open a pr to show me what you have ?
Hi @0xLucqs , can I be assigned please? This would be my first time contributing to this repository and I would love to be given this opportunity.
can you open a pr to show me what you have ?
Alright
Hello @0xLucqs , I just made a draft PR regarding this issue. I will appreciate it if this issue is assigned to me. Thanks
I am applying to this issue via OnlyDust platform.
I have experience optimizing Rust code for performance and clarity, focusing on efficient and maintainable solutions to address challenges.
The check compares a slice to an empty one, recommending .is_empty() for better performance and clarity. I'd replace manual comparisons with .is_empty() to improve the code.
What it does
Checks for comparing to an empty slice such as [], and suggests using
.is_empty()
where applicable.Why is this bad?
Some structures can answer
.is_empty()
much faster than checking for equality. So it is good to get into the habit of using.is_empty()
, and having it is cheap. Besides, it makes the intent clearer than a manual comparison in some contexts.Example
Use instead: