-
Notifications
You must be signed in to change notification settings - Fork 645
Remove some usage of unwrap()
#2072
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @sgrif (rust_highfive has picked a reviewer for you, use r? to override) |
This commit reduces the usage of unwrap within the request/response lifecycle, and documents a few remaining cases. Usage of unwrap in tests, binaries, or server boot code is generally okay and was not reviewed. Remaining work: * Some usage of unwrap in `git.rs` and `srcc/tasks/` background jobs. This code is not directly in the request/response lifecycle, but should be reviewed. * Current usage in middleware seems okay, but could be documented. In most cases, such as with the handler in `AroundMiddleware`, the conduit API ensures a handler is set.
14a1859
to
7aee526
Compare
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.
Just one little thought about implementing std::error::Error. I'm ok merging without it tho!
I've push a commit to add impls for
Yeah, looks like it was missed before and I has already removed the @bors r=carols10cents |
📌 Commit a318cb3 has been approved by |
Remove some usage of `unwrap()` This commit reduces the usage of unwrap within the request/response lifecycle, and documents a few remaining cases. Usage of unwrap in tests, binaries, or server boot code is generally okay and was not reviewed. Remaining work: * Some usage of unwrap in `git.rs` and `src/tasks/` background jobs. This code is not directly in the request/response lifecycle, but should be reviewed. * Current usage in middleware seems okay, but could be documented. In most cases, such as with the handler in `AroundMiddleware`, the conduit API ensures a handler is set.
☀️ Test successful - checks-travis |
This commit reduces the usage of unwrap within the request/response
lifecycle, and documents a few remaining cases. Usage of unwrap in
tests, binaries, or server boot code is generally okay and was not
reviewed.
Remaining work:
git.rs
andsrc/tasks/
background jobs.This code is not directly in the request/response lifecycle, but
should be reviewed.
In most cases, such as with the handler in
AroundMiddleware
, theconduit API ensures a handler is set.