-
Notifications
You must be signed in to change notification settings - Fork 400
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
Fix the compile error while running the cargo clippy #540
Conversation
Signed-off-by: git-hulk <hulk.website@gmail.com>
59cea58
to
0399217
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go.
BTW, what's Rust toolchain do you use? Perhaps we can add a rust-toolchain file or add a package.rust-version
field in Cargo.toml.
@git-hulk more violations are found. Please try to fix them. |
More error ... Weird. Why they are not spotted before in CI. |
But all about styles / format |
@tisonkun Yeah, I'm fixing them, it might be caused by the rules in the new version of the toolchain. |
Signed-off-by: git-hulk <hulk.website@gmail.com>
Head branch was pushed to by a user without write access
1e2861d
to
9be2cfc
Compare
@tisonkun I have tested on my side and it works now: https://github.com/git-hulk/raft-rs/actions/runs/8454044888/job/23158169847 |
trait AssertSend: Send {} | ||
|
||
impl<T: Storage + Send> AssertSend for Raft<T> {} | ||
impl<T: Storage + Send> Raft<T> {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a wrong change. AssertSend
is used to ensure Raft<T>
is always Send
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fixing this. Sorry to miss.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for wrongly removing this constraint.
I ran the instruction
cargo clippy --all --all-targets -- -D clippy::all
according to the README and got below error: