-
Notifications
You must be signed in to change notification settings - Fork 280
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 clippy warnings #505
Fix clippy warnings #505
Conversation
One other note: if we're going to start caring about clippy lints (which I think we ought to), I think we should probably add a Clippy check step on CI. This will stop us from going and adding new code that clippy doesn't like, and having to do another big "fix clippy warnings" PR to make them go away. We can do that separately, though. |
tower/src/balance/p2c/service.rs
Outdated
|
||
/// Returns whether or not the balancer is empty. | ||
pub fn is_empty(&self) -> bool { | ||
self.len() == 0 |
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 would expect this to trigger clippy. Should this be:
self.len() == 0 | |
self.services.is_empty() |
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 not sure if ReadyCache actually has an is_empty
, but it probably should if it does not...
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.
Uh good catch. Fixed in 5dc6044
Thought I might as well fix the clippy warnings. Feel free to close this if you don't want the git churn.