From 2072c933ba6448966c50ad50887af51f95ee39c2 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Mon, 30 Jul 2018 15:04:52 -0700 Subject: [PATCH] handle error during request creation --- src/client/request.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/request.rs b/src/client/request.rs index 650f0eea..72aab259 100644 --- a/src/client/request.rs +++ b/src/client/request.rs @@ -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 }