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

while_let loop still has bugs! #383

Closed
wafflespeanut opened this issue Oct 12, 2015 · 3 comments
Closed

while_let loop still has bugs! #383

wafflespeanut opened this issue Oct 12, 2015 · 3 comments

Comments

@wafflespeanut
Copy link
Contributor

For the following code,

loop {
    let foo = match y {
        Some(x) => x,
        None => break,
    };
    let bar = Some(foo);
}

clippy seems to suggest,

while let Some(x) = y {
    let bar = Some(foo);
}

It's actually the wrong let binding. The code which lives at src/loops.rs, seems to print the match arm directly, instead of checking whether it's the right pattern.

@Manishearth
Copy link
Member

Could you fix this in your current PR?

@wafflespeanut
Copy link
Contributor Author

alright, I thought it'd be a good first issue :)

@mcarton
Copy link
Member

mcarton commented Mar 6, 2016

I’m closing, see #721.

@mcarton mcarton closed this as completed Mar 6, 2016
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

No branches or pull requests

3 participants