Skip to content

Conversation

mcarton
Copy link
Contributor

@mcarton mcarton commented Jun 28, 2016

For the next nightly. Don't bother @travis.
Ref rust-lang/rust#34424.

fn expr_block(block: &ast::Block) -> Option<&ast::Expr> {
let mut it = block.stmts.iter();

if let (Some(stmt), None) = (it.next(), it.next()) {
Copy link
Member

Choose a reason for hiding this comment

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

I love this pattern

@mcarton mcarton merged commit d243d68 into master Jul 2, 2016
@mcarton mcarton deleted the rustup branch July 2, 2016 14:16
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