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:
Jacob Hoffman-Andrews
2020-12-05 12:05:29 -08:00
committed by GitHub
parent 57f251d766
commit 6c9378ce37
7 changed files with 27 additions and 30 deletions

View File

@@ -369,7 +369,7 @@ mod tests {
#[cfg(feature = "tls")]
fn connect_https_invalid_name() {
let result = get("https://example.com{REQUEST_URI}/").call();
let e = ErrorKind::DnsFailed;
let e = ErrorKind::Dns;
assert_eq!(result.unwrap_err().kind(), e);
}
}