@@ -6,6 +6,9 @@ pub enum HttpsConnectorError<E: Send> {
6
6
HttpConnector ( E ) ,
7
7
/// `native_tls` failed when setting up a TLS connection.
8
8
NativeTls ( native_tls:: Error ) ,
9
+
10
+ #[ doc( hidden) ]
11
+ __Nonexhaustive,
9
12
}
10
13
11
14
impl < E : Send + std:: fmt:: Debug > std:: fmt:: Debug for HttpsConnectorError < E > {
@@ -22,6 +25,7 @@ impl<E: Send + std::fmt::Debug> std::fmt::Debug for HttpsConnectorError<E> {
22
25
. debug_tuple ( "HttpsConnectorError::NativeTls" )
23
26
. field ( err)
24
27
. finish ( ) ,
28
+ HttpsConnectorError :: __Nonexhaustive => unimplemented ! ( ) ,
25
29
}
26
30
}
27
31
}
@@ -34,6 +38,7 @@ impl<E: Send + std::fmt::Display> std::fmt::Display for HttpsConnectorError<E> {
34
38
}
35
39
HttpsConnectorError :: HttpConnector ( err) => write ! ( f, "http connector error: {}" , err) ,
36
40
HttpsConnectorError :: NativeTls ( err) => write ! ( f, "native tls error: {}" , err) ,
41
+ HttpsConnectorError :: __Nonexhaustive => unimplemented ! ( ) ,
37
42
}
38
43
}
39
44
}
@@ -44,6 +49,7 @@ impl<E: Send + std::error::Error + 'static> std::error::Error for HttpsConnector
44
49
HttpsConnectorError :: ForceHttpsButUriNotHttps => None ,
45
50
HttpsConnectorError :: HttpConnector ( err) => Some ( err) ,
46
51
HttpsConnectorError :: NativeTls ( err) => Some ( err) ,
52
+ HttpsConnectorError :: __Nonexhaustive => unimplemented ! ( ) ,
47
53
}
48
54
}
49
55
}
0 commit comments