-
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: fix clippy #553
fix: fix clippy #553
Conversation
Signed-off-by: Dat Tien Nguyen <[email protected]>
Signed-off-by: Dat Tien Nguyen <[email protected]>
it's known issue: rust-lang/rust-clippy#13185 |
Signed-off-by: Dat Tien Nguyen <[email protected]>
Signed-off-by: Dat Tien Nguyen <[email protected]>
Signed-off-by: Dat Tien Nguyen <[email protected]>
src/lib.rs
Outdated
@@ -469,7 +469,7 @@ node.propose_conf_change(vec![], cc).unwrap(); | |||
This process is a two-phase process, during the midst of it the peer group's leader is managing | |||
**two independent, possibly overlapping peer sets**. | |||
|
|||
> **Note:** In order to maintain resiliency guarantees (progress while a majority of both peer sets is | |||
\> **Note:** In order to maintain resiliency guarantees (progress while a majority of both peer sets is |
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.
Why escape this?
datadriven/src/test_data_reader.rs
Outdated
@@ -205,6 +205,7 @@ impl<'a> TestDataReader<'a> { | |||
} | |||
} | |||
|
|||
#[allow(clippy::manual_inspect)] | |||
pub fn emit(&mut self, str: &str) { | |||
self.rewrite_buffer.as_mut().map(|rb| { |
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.
How about changing it with if let Some(rb) = &mut self.rewrite_buffer
?
src/lib.rs
Outdated
@@ -571,6 +571,7 @@ pub mod prelude { | |||
/// | |||
/// Currently, this is a `log` adaptor behind a `Once` to ensure there is no clobbering. | |||
#[cfg(any(test, feature = "default-logger"))] | |||
#[allow(static_mut_refs)] |
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.
How about using OnceLock
to replace both LOGGER_INITIALIZED
and LOGGER
? static_mut_refs
may be a hard error in the future.
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.
ok, I have updated the PR.
Signed-off-by: Dat Tien Nguyen <[email protected]>
Thank you! |
comment fix-ci