-
Notifications
You must be signed in to change notification settings - Fork 5
fix wrong statistics dump + clippy + gh action #17
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
base: master
Are you sure you want to change the base?
Conversation
| let mut calls = self.calls.clone(); | ||
| calls.sort(); |
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.
Problem was that I cloned the calls vec, sorted it, and then called self.calls.get(i) instead of just calls.get(i) (on the cloned vec).
I decided to fix it by removing the call for clone, changing the signature to receive a mutable reference to self and sort the calls vec in place (on self).
This way its more readable, less error prune and less memcps.
Wdyt?
| enabled: Option<bool>, | ||
| _enabled: Option<bool>, | ||
| #[darling(default)] | ||
| main: Option<String>, | ||
| _main: Option<String>, |
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.
These 2 fields are never read according to clippy, I didn't want to delete them because it'll be a breaking change. Wdyt?
|
hey, can you bump the version and also publish the update please? |
|
i totally forgot about this pr lol |
Hello @y2kappa, its been a while! 😁
I'm using this crate in one of my other projects and noticed that the statistics dump wasn't calculated correctly, so I took a few minutes to fix this up (will explain the issue in comments)
I also noticed that there are clippy warnings hanging around for a while that for some reason didn't fail the CI! So I replaced the action with another one Im familiar with and know it works better, and fixed those clippy warnings.
Hope to get a review soon, thanks!