mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-30 18:34:36 +01:00
handle error during request creation
This commit is contained in:
parent
7bc0ace52d
commit
2072c933ba
@ -316,8 +316,7 @@ impl ClientRequestBuilder {
|
|||||||
/// Set HTTP method of this request.
|
/// Set HTTP method of this request.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn get_method(&mut self) -> &Method {
|
pub fn get_method(&mut self) -> &Method {
|
||||||
let parts =
|
let parts = self.request.as_ref().expect("cannot reuse request builder");
|
||||||
parts(&mut self.request, &self.err).expect("cannot reuse request builder");
|
|
||||||
&parts.method
|
&parts.method
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user