1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 00:21:08 +01:00

handle error during request creation

This commit is contained in:
Nikolay Kim 2018-07-30 15:04:52 -07:00
parent 7bc0ace52d
commit 2072c933ba

View File

@ -316,8 +316,7 @@ impl ClientRequestBuilder {
/// Set HTTP method of this request.
#[inline]
pub fn get_method(&mut self) -> &Method {
let parts =
parts(&mut self.request, &self.err).expect("cannot reuse request builder");
let parts = self.request.as_ref().expect("cannot reuse request builder");
&parts.method
}