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

Some clippy fixes #122

Closed
wants to merge 4 commits into from
Closed

Some clippy fixes #122

wants to merge 4 commits into from

Conversation

qm3ster
Copy link
Contributor

@qm3ster qm3ster commented Apr 23, 2021

A bit more are on the way. Edit: ye, am done now. The rest require bikeshedding, maybe even conscious thought.

Stuff like

match tok.try_wait() {
    //Some(Err(Error::Paho(ERR_CODE))) => (),
    Some(Err(Error::PahoDescr(ERR_CODE, _))) => (),
    Some(Err(_)) => assert!(false),
    Some(Ok(_)) => assert!(false),
    None => assert!(false)
}

I changed to

match tok.try_wait() {
    //  Some(Err(Error::Paho(ERR_CODE))) => {}
    Some(Err(Error::PahoDescr(ERR_CODE, _))) => {}
    Some(Err(_)) | Some(Ok(_)) | None => unreachable!()
}

because

assert_matches!(tok.try_wait().unwrap_err(), Error::PahoDescr(ERR_CODE, _));

or

assert_matches!(tok.try_wait(), Err(Error::PahoDescr(ERR_CODE, _)));

is not stable yet

@qm3ster
Copy link
Contributor Author

qm3ster commented Apr 23, 2021

I am likely done for this week... or this life? Peace out!

And remember - never squash marge, think of the children.

@fpagliughi
Copy link
Contributor

fpagliughi commented Apr 23, 2021

Merged into the develop branch.
Thanks, again, @qm3ster !

@fpagliughi fpagliughi closed this Apr 23, 2021
@qm3ster qm3ster deleted the clippy branch April 24, 2021 18:32
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