Skip to content
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

Use an explicit type annotation here #187

Closed
wants to merge 1 commit into from

Conversation

michaelklishin
Copy link
Member

References #186.

One hypothesis in #186 was that compiler's type inference fails to determine that the value should be a usize. Since AtomicUsize#fetch_add returns a usize, I highly doubt it is a compiler issue. Instead, the cloning/concurrency factors are more important.

That said, this was trivial to put together, so why not use this PR to verify the hypothesis.

@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.70% 🎉

Comparison is base (f335c59) 86.80% compared to head (b904487) 87.51%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #187      +/-   ##
==========================================
+ Coverage   86.80%   87.51%   +0.70%     
==========================================
  Files          68       68              
  Lines        5503     5503              
==========================================
+ Hits         4777     4816      +39     
+ Misses        726      687      -39     
Files Changed Coverage Δ
src/producer.rs 80.04% <100.00%> (ø)

... and 9 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michaelklishin michaelklishin deleted the mk-explicit-counter-type branch August 10, 2023 19:30
@michaelklishin
Copy link
Member Author

This was to demonstrate that this change isn't necessary and prove a certain hypothesis wrong => closing.

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.

1 participant