fix clippy#412
Merged
loongs-zhang merged 1 commit intoJul 25, 2025
Merged
Conversation
5128ca4 to
36e9473
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR addresses Clippy warnings by replacing std::mem::transmute calls with safer type conversion methods and updating modulo operations to use the more expressive is_multiple_of method.
- Replace unsafe
transmuteoperations with safe byte conversion methods in x86 architecture-specific code - Update modulo checks to use the
is_multiple_ofmethod for better readability
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| core/src/coroutine/korosensei.rs | Replaces transmute with safe byte conversions for x86 register handling |
| core/src/common/work_steal.rs | Updates modulo operation to use is_multiple_of method |
| core/src/common/ordered_work_steal.rs | Updates modulo operation to use is_multiple_of method |
Comments suppressed due to low confidence (2)
core/src/common/work_steal.rs:281
- The
is_multiple_ofmethod was stabilized in Rust 1.82.0. If this codebase targets an earlier Rust version, this method may not be available and could cause compilation failures.
if self.tick().is_multiple_of(61) {
core/src/common/ordered_work_steal.rs:350
- The
is_multiple_ofmethod was stabilized in Rust 1.82.0. If this codebase targets an earlier Rust version, this method may not be available and could cause compilation failures.
if self.tick().is_multiple_of(61) {
36e9473 to
83d7e35
Compare
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.
// Describe your PR here; eg. Fixes #issueNo
Make sure that: