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

Rust: Express the main loop through an iterator #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

skade
Copy link
Contributor

@skade skade commented Oct 28, 2015

Similar to the PR before.

No performance difference, as far as I can see.

@skade skade changed the title Express the main loop through an iterator Rust: Express the main loop through an iterator Oct 28, 2015
@skade
Copy link
Contributor Author

skade commented Oct 28, 2015

I added a tiny cleanup patch that makes it use slices throughout. Do you need a separate PR for that?

earliest = connection.arrival_timestamp;
}
} else if connection.arrival_timestamp > earliest {
break;
Copy link

Choose a reason for hiding this comment

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

You loose this early break

@TeXitoi
Copy link

TeXitoi commented Oct 29, 2015

Iterator adaptors are great, but please don't abuse it.

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