Skip to content

Three std::cmp's is probably enough. Other cleanup. #21

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

Merged
merged 1 commit into from
Feb 20, 2017

Conversation

marshallpierce
Copy link
Collaborator

No description provided.

@@ -696,8 +694,7 @@ impl<T: Counter> Histogram<T> {

/// Allocate a counts array of the given size.
fn alloc(&mut self, len: usize) {
use std::iter;
self.counts = iter::repeat(T::zero()).take(len).collect();
self.counts = std::iter::repeat(T::zero()).take(len).collect();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To my eyes this is no less readable, and saves a line.

@jonhoo jonhoo merged commit bd878c1 into HdrHistogram:master Feb 20, 2017
@marshallpierce marshallpierce deleted the tidy-use-declarations branch February 20, 2017 19:20
@jonhoo
Copy link
Collaborator

jonhoo commented Feb 20, 2017

This and #20 could probably have gone together in one PR with two commits ;)

@marshallpierce
Copy link
Collaborator Author

You're blowing my mind! :P

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