-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add manual_unwrap_or
#66
Comments
Hi @0xLucqs, I would like to work in this one asap 🫡 |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedHello, I can easily work on this task. I will be glad if this task is assigned to me. |
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! |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI have contributed to a lot of project in Starknet, I have experience in Rust How I plan on tackling this issueRead the code base and merged PR and implement in a similar way |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI have a strong background in software development, particularly in Rust programming. My experience includes contributing to various projects, where I’ve focused on improving code quality and readability through the use of tools like Clippy. I’m well-versed in identifying code patterns that can lead to inefficiencies and am passionate about promoting best practices within the Rust community. This background enables me to effectively identify and implement lints like manual_unwrap_or, ensuring that developers can write cleaner, more maintainable code. How I plan on tackling this issueTo tackle the implementation of the manual_unwrap_or lint, I would start by analyzing common patterns in existing Rust codebases where developers manually implement the behavior of Option::unwrap_or and Result::unwrap_or. I’d focus on identifying these patterns by reviewing various projects and gathering examples. Next, I would define the lint logic by creating a set of rules that can effectively detect these patterns using the Rust Analyzer framework. This would involve pattern matching within the abstract syntax tree (AST) to pinpoint instances of manual matching that could be simplified. After establishing the detection logic, I would prioritize thorough testing to ensure that the lint accurately identifies the intended patterns without false positives. This would include writing unit tests and integration tests to cover a wide range of scenarios |
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! |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI am a rust developer of close to a year that is interested in open source and tackling problems I recently made contributions to the rust and typescript technical content of solana-developers and I aim looking to make more meaningful contributions to other rust based projects in the web3 ecosystem How I plan on tackling this issueI would do research by studying the logic of the manual_unwrap_or lint rule for the rust_analyzer program , then write the relevant logic for the lint rule based on this implementation to find similar patterns that use pattern matching that is those that reimplement |
I am applying to this issue via OnlyDust platform. My background and how it can be leveragedI'm an undergraduate in Computer Science and am well experienced in coding across different programming languages. Along the way, I have enjoyed building efficient algorithms, practicing data structures, and tackling problems in clean, optimized code. So far, I've had fun using best practices to enhance performance and readability in projects. I'm excited about this project because it will take my coding abilities, problem-solving skills, and passion for learning to the benefit of improving and maintaining code quality. With my strong foundation in computer science and eagerness to collaborate on impactful projects, you can expect to receive valuable contributions from me. |
What it does
Finds patterns that reimplement
Option::unwrap_or
orResult::unwrap_or
.Why is this bad?
Concise code helps focusing on behavior instead of boilerplate.
Example
Use instead:
https://rust-lang.github.io/rust-clippy/master/index.html#/manual_unwrap_or
The text was updated successfully, but these errors were encountered: