ash: Remove unnecessary trivial_casts and trivial_numeric_casts #564
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.
While making the code only marginally harder to read such casts can also introduce subtle bugs when used incorrectly, and are best omitted whenever unnecessary: Rust already coerces borrows into raw pointers when the types on both ends are clear, and even then there remain many casts that are identical to the source type.
In addition these errors show up when using a local crate reference to
ash
in a workspace that uses "the.cargo/config.toml
setup" from EmbarkStudios/rust-ecosystem#68 to configure linter warnings project-wide instead of for all crates in that workspace individually. In our case aforementioned linter warnings are enabled on top of Embark's configuration, leading to a lot of these warnings in our build process.