-
Notifications
You must be signed in to change notification settings - Fork 33
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
refactor: address clippy warnings + code cleanup #125
Conversation
Compatibility notes:
|
Yeah, I'm reluctant to accept PRs that bump MSRV unless we really need to. (If you plan on updating this PR please add new commits undoing the changes that need MSRV so it's easy to review) |
Yeah I'm reluctant to change MSRV just for code cleanliness. This crate is at the bottom of a bunch of long deptrees so we're conservative about MSRV. #126 to mark it in Cargo.toml (this will make clippy less noisy about features that don't exist on MSRV) |
Our major downstream crates ( While I agree we need to be conservative with MSRV, I’m not sure we need to support toolchains that are more than 3 years out of date. Anyone using a 4-year-old compiler will generally need to keep their dependencies locked to old versions too. So I personally would be comfortable bumping to Rust 1.47 even without a strong need. Conveniently, I believe Rust 1.47 is also the first version that can read |
I'm fine with moving to 1.47 |
So is it okay to merge the changes as-is? |
You'd need to add a commit changing MSRV and MSRV CI to 1.47 |
Alright |
Done |
Hi! Thank you so much for this package, probably one of the most reliable Unicode bidi libraries I've ever discovered.
The following pull request cleans up the codebase by addressing (most) clippy warnings while also cleaning up other things i've noitced too. Like:
matches!
over manualmatch
orif let
statements..find(...)
over.filter(...).next()
..flatten()
for some nested for-loops.DirectionalStatusStack
as it's only used in one function in the codebase, and basically a wrapper over aVec<Status>
that doesn't do anything different.If you have any feedback regarding this pull request, feel free to tell me! Cheers!