Skip to content

Conversation

@yonip23
Copy link
Contributor

@yonip23 yonip23 commented Dec 9, 2021

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!

Comment on lines -26 to -27
let mut calls = self.calls.clone();
calls.sort();
Copy link
Contributor Author

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?

Comment on lines -12 to +14
enabled: Option<bool>,
_enabled: Option<bool>,
#[darling(default)]
main: Option<String>,
_main: Option<String>,
Copy link
Contributor Author

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?

@y2kappa
Copy link
Owner

y2kappa commented Dec 30, 2021

hey, can you bump the version and also publish the update please?

@yonip23
Copy link
Contributor Author

yonip23 commented Mar 8, 2022

i totally forgot about this pr lol
how do you publish? i dont have an account in crates.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants