We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
manual_assert
Detects if-then-panic! that can be replaced with assert!.
assert! is simpler than if-then-panic!.
assert!
let sad_people: Array<&str> = arrray![]; if !sad_people.is_empty() { panic!("there are sad people: {:?}", sad_people); }
Use instead:
let sad_people: Array<&str> = array![]; assert!(sad_people.is_empty(), "there are sad people: {:?}", sad_people);
https://rust-lang.github.io/rust-clippy/master/index.html#/manual_assert
The text was updated successfully, but these errors were encountered:
Hi, I would like to work on this!
Sorry, something went wrong.
Hey @stevencartavia! Thanks for showing interest. We've created an application for you to contribute to Cairo lint. Go check it out on OnlyDust!
let's go!
Successfully merging a pull request may close this issue.
What it does
Detects if-then-panic! that can be replaced with assert!.
Why is this bad?
assert!
is simpler than if-then-panic!.Example
Use instead:
https://rust-lang.github.io/rust-clippy/master/index.html#/manual_assert
The text was updated successfully, but these errors were encountered: