Skip to content
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

Remove let _ #14

Open
omid opened this issue Mar 6, 2023 · 4 comments
Open

Remove let _ #14

omid opened this issue Mar 6, 2023 · 4 comments
Assignees
Labels
help wanted Extra attention is needed todo

Comments

@omid
Copy link

omid commented Mar 6, 2023

There are many let _s, most of them (or maybe all of them) are useless in your code.

@pouriya
Copy link
Owner

pouriya commented Mar 6, 2023

Thanks.

@pouriya pouriya self-assigned this Mar 6, 2023
@pouriya pouriya added the todo label Mar 6, 2023
@pouriya
Copy link
Owner

pouriya commented Mar 6, 2023

Most of them are here which is copied and pasted from human-panic. Do you know why they did this?

@omid
Copy link
Author

omid commented Mar 6, 2023

write! returns a Result. And Result is #[must_use]. Means users need to handle the Result.
In the case of human-panic, they didn't use the result, so they forced Rust to ignore them.
But in your case, you mostly/always use ? to actually use it. So there is no need for let _.

ps: anyway, since you are here... humad-panic is also an unused dep in your crate :)

@pouriya
Copy link
Owner

pouriya commented Mar 6, 2023

Thank you for the explanation.
I forgot to remove it 🤣

@pouriya pouriya added the help wanted Extra attention is needed label Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed todo
Projects
None yet
Development

No branches or pull requests

2 participants