-
Notifications
You must be signed in to change notification settings - Fork 321
Trait impls for tuples of arity <= 12 #475
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
Conversation
following the convention of libcore fixes rust-itertools#428 fixes rust-itertools#398
loop { | ||
$( | ||
let $Y = if let Some($Y) = iter.next() { | ||
$Y | ||
} else { | ||
break; | ||
}; | ||
)* | ||
return Some(($($Y),*,)) | ||
} | ||
|
||
return None; | ||
Some(($( | ||
{ let $Y = iter.next()?; $Y }, | ||
)*)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this modification is semantically equivalent, but I'd love if someone else could check it over before I merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Godbolt even seems to generate very similar code in --release
.
off-topic: I do not have much time to spare at the moment, so I will be slow to respond.
Seems like a random CI failure? bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
bors r+ |
Build succeeded: |
I stopped at 12, because that's where libcore stops.
fixes #428
fixes #398