Redesign Error type
				
					
				
			- The `Error`'s kind is a now a set of variants depending on the context of when an error could occur. - If another error was the cause, it is now always the `source`. Along with the `is_*` methods, this should help in understanding *when* a certain error occurred. For example, an error setting the TLS certificates will return a builder error, with the TLS error as the source. This should help differentiate from a TLS error that happens when connecting to a server. It also makes the internal code less dependent on all the exact dependencies that can be enabled or disabled.
This commit is contained in:
		| @@ -154,11 +154,11 @@ impl Stream for ImplStream { | ||||
|             } => { | ||||
|                 if let Some(ref mut timeout) = timeout { | ||||
|                     if let Poll::Ready(()) = Pin::new(timeout).poll(cx) { | ||||
|                         return Poll::Ready(Some(Err(crate::error::timedout(None)))); | ||||
|                         return Poll::Ready(Some(Err(crate::error::body(crate::error::TimedOut)))); | ||||
|                     } | ||||
|                 } | ||||
|                 futures_core::ready!(Pin::new(body).poll_data(cx)) | ||||
|                     .map(|opt_chunk| opt_chunk.map(Into::into).map_err(crate::error::from)) | ||||
|                     .map(|opt_chunk| opt_chunk.map(Into::into).map_err(crate::error::body)) | ||||
|             } | ||||
|             Inner::Reusable(ref mut bytes) => { | ||||
|                 if bytes.is_empty() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user