Conversation
Notes: - Warnings related to unsafe code has not been touched. - The number of warnings has been reduced from 527 to 3. - A few lints has been allowed globally, for convenience. Fixes: - fixed macros to use `$` in `$crate::`. - broke some long lines for readability. - solved some unneded mutable references. - simplified unneeded vecs for arrays. - simplified unneeded explicit returns. - simplified unneeded redundant conversions. - simplified fn signatures returning unit type. - simplified verbose comparisons with booleans. - simplified unnecessary explicit dereferences. - allowed some functions with too many args. - implemented `Default` for several items. - ...among others.
- Warnings related to unsafe code has not been touched. - The number of warnings has been reduced from 381 to 7 errors (denied lints). Fixes: - replaced unmaintained objc crate with fork SSheldon/rust-objc#125. - Ideally it would be replaced with https://github.com/madsmtm/objc2 but that'd be too much work. - simplified zero pointers and redundant casts and clones. - fixed slow zero-filling vector initialization. - simplified unneeded explicit returns. - simplified unnecessary lifetimes. - ...among others.
- Warnings related to unsafe code has not been touched. - The number of warnings has been reduced from 19 to 0. Fixes: - simplified redundant casts. - simplified bool comparisons. - simplified unnecessary lifetimes. - simplified unneeded explicit returns. - simplified unnecessary map_or. - made transmute types explict. - ...among others.
- Warnings related to unsafe code has not been touched. - The number of warnings has been reduced from 7 to 3 errors (denied lints). - made thread_local initializer const. - simplified unneded explicit returns. - reformat confusing else if.
- Warnings related to unsafe code has not been touched. - The number of warnings has been reduced from 9 to 2 + 7 errors (denied lints). - simplified manual range contains. - simplified unneded explicit returns. - simplified destructuring with match to if let.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This reduces the number of warnings from 943 between all platforms to just 22. Leaving the ones related mostly with ambiguous unsafe code, which now stands out more, instead of being buried under a pile.
I've been careful to apply clippy suggestions that increases clarity, while allowing the lints that made more sense otherwise. But please feel free to comment and suggest anything done differently.
to check run, e.g.: