Update to hyper 0.13
This commit is contained in:
		
				
					committed by
					
						 Sean McArthur
						Sean McArthur
					
				
			
			
				
	
			
			
			
						parent
						
							db2de90e42
						
					
				
				
					commit
					0f32c4a01a
				
			| @@ -1,4 +1,4 @@ | ||||
| use http::HttpTryFrom; | ||||
| use std::convert::TryFrom; | ||||
| use std::fmt; | ||||
|  | ||||
| use http::Method; | ||||
| @@ -96,13 +96,15 @@ impl RequestBuilder { | ||||
|     /// Add a `Header` to this Request. | ||||
|     pub fn header<K, V>(mut self, key: K, value: V) -> RequestBuilder | ||||
|     where | ||||
|         HeaderName: HttpTryFrom<K>, | ||||
|         HeaderValue: HttpTryFrom<V>, | ||||
|         HeaderName: TryFrom<K>, | ||||
|         <HeaderName as TryFrom<K>>::Error: Into<http::Error>, | ||||
|         HeaderValue: TryFrom<V>, | ||||
|         <HeaderValue as TryFrom<V>>::Error: Into<http::Error>, | ||||
|     { | ||||
|         let mut error = None; | ||||
|         if let Ok(ref mut req) = self.request { | ||||
|             match <HeaderName as HttpTryFrom<K>>::try_from(key) { | ||||
|                 Ok(key) => match <HeaderValue as HttpTryFrom<V>>::try_from(value) { | ||||
|             match <HeaderName as TryFrom<K>>::try_from(key) { | ||||
|                 Ok(key) => match <HeaderValue as TryFrom<V>>::try_from(value) { | ||||
|                     Ok(value) => { | ||||
|                         req.headers_mut().append(key, value); | ||||
|                     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user