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

Use expects() more appropriately #504

Merged
merged 2 commits into from
Aug 3, 2017

Conversation

mulkieran
Copy link
Member

@mulkieran mulkieran commented Aug 2, 2017

Use expects() to convey information and if there is no information to convey, turn them into unwraps().

rust-lang/rust-clippy#1921 (comment)

We have no logical reason to expect that instantiating the DM context will
succeed here. We do not treat success as inevitable anywhere else.

Signed-off-by: mulhern <amulhern@redhat.com>
"must exist" is almost information free.

Signed-off-by: mulhern <amulhern@redhat.com>
@mulkieran mulkieran changed the title Turn an expect into an unwrap() Use expects() more appropriately Aug 2, 2017
@mulkieran mulkieran requested review from agrover and trgill August 2, 2017 16:01
@mulkieran
Copy link
Member Author

mulkieran commented Aug 2, 2017

@tasleson @agrover @trgill review?

@agrover
Copy link
Contributor

agrover commented Aug 3, 2017

seems good 👍

@trgill trgill merged commit 10e667f into stratis-storage:master Aug 3, 2017
mulkieran added a commit to mulkieran/stratisd that referenced this pull request May 13, 2020
mulkieran added a commit that referenced this pull request Oct 24, 2021
Add an audit task to the Makefile and to Travis CI
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.

3 participants