-
Notifications
You must be signed in to change notification settings - Fork 160
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
Annotate metric types with must_use #475
Conversation
I just pushed a fix to |
Rebased and tests are passing locally. |
Woops, missed approving this... but I guess it doesn't really matter. 😂 |
Released in Thanks again for your contribution. 🙏🏻 |
I'm not sure if this was actually a good idea. An argument could be made that calling In fact for the usage in my project I think that all usages that trigger this warning should actually be fixed to not trigger the warning for performance reasons, but it still strikes me as a false positive. |
Then you can explicitly ignore the return value |
Not using a future is always a bug. But you are right, |
Happened to me just now, I created a counter and never incremented it and was wondering where my metric is going or if that piece of code was ever ran.
Annotate the metric types with must use and let the compiler warn us if they are never used.