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

fixed some clippy warnings #55

Merged
merged 2 commits into from
Aug 14, 2016
Merged

fixed some clippy warnings #55

merged 2 commits into from
Aug 14, 2016

Conversation

llogiq
Copy link
Contributor

@llogiq llogiq commented Aug 12, 2016

No description provided.

@@ -72,14 +72,14 @@ impl<A> Future for SelectAll<A>
}

fn schedule(&mut self, task: &mut Task) {
for f in self.inner.iter_mut() {
for f in &mut self.inner {
Copy link
Member

Choose a reason for hiding this comment

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

I personally prefer .iter_mut() instead of &mut foo, could this stay the same?

@llogiq
Copy link
Contributor Author

llogiq commented Aug 12, 2016

Sure, can revert those once I had some sleep.

@alexcrichton alexcrichton merged commit 7fe06c0 into rust-lang:master Aug 14, 2016
@alexcrichton
Copy link
Member

Thanks!

@llogiq llogiq deleted the clippy branch August 14, 2016 11:15
@llogiq
Copy link
Contributor Author

llogiq commented Aug 14, 2016

You're welcome. If I may ask: What's your rationale for preferring the explicit call instead of using IntoIterator?

@alexcrichton
Copy link
Member

I personally find for foo in bar.iter() much easier to read than for foo in &bar. If you're new to Rust then the first is pretty clear what's happening where the latter just has this sigil & that seems odd.

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