De-redundantize Error kinds. (#259)
Change "Bad" to "Invalid" in error names, mimicking io::Error::ErrorKind. Change InvalidProxyCreds to ProxyUnauthorized. Change DnsFailed to just Dns (the fact that there was a failure is implicit in the fact that this was an error).
This commit is contained in:
committed by
GitHub
parent
57f251d766
commit
6c9378ce37
@@ -106,7 +106,7 @@ fn redirect_host() {
|
||||
let url = format!("http://localhost:{}/", srv.port);
|
||||
let result = crate::Agent::new().get(&url).call();
|
||||
assert!(
|
||||
matches!(result, Err(ref e) if e.kind() == ErrorKind::DnsFailed),
|
||||
matches!(result, Err(ref e) if e.kind() == ErrorKind::Dns),
|
||||
"expected Err(DnsFailed), got: {:?}",
|
||||
result
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user