@@ -48,8 +48,6 @@ impl From<libc::c_int> for ErrorType {
48
48
49
49
enum Context {
50
50
InvalidInput ,
51
- #[ allow( unused) ]
52
- MissingWaker ,
53
51
Code ( s2n_status_code:: Type , Errno ) ,
54
52
Application ( Box < dyn std:: error:: Error + Send + Sync + ' static > ) ,
55
53
}
@@ -185,7 +183,6 @@ impl Error {
185
183
pub fn name ( & self ) -> & ' static str {
186
184
match self . 0 {
187
185
Context :: InvalidInput => "InvalidInput" ,
188
- Context :: MissingWaker => "MissingWaker" ,
189
186
Context :: Application ( _) => "ApplicationError" ,
190
187
Context :: Code ( code, _) => unsafe {
191
188
// Safety: we assume the string has a valid encoding coming from s2n
@@ -197,9 +194,6 @@ impl Error {
197
194
pub fn message ( & self ) -> & ' static str {
198
195
match self . 0 {
199
196
Context :: InvalidInput => "A parameter was incorrect" ,
200
- Context :: MissingWaker => {
201
- "Tried to perform an asynchronous operation without a configured waker"
202
- }
203
197
Context :: Application ( _) => "An error occurred while executing application code" ,
204
198
Context :: Code ( code, _) => unsafe {
205
199
// Safety: we assume the string has a valid encoding coming from s2n
@@ -210,7 +204,7 @@ impl Error {
210
204
211
205
pub fn debug ( & self ) -> Option < & ' static str > {
212
206
match self . 0 {
213
- Context :: InvalidInput | Context :: MissingWaker | Context :: Application ( _) => None ,
207
+ Context :: InvalidInput | Context :: Application ( _) => None ,
214
208
Context :: Code ( code, _) => unsafe {
215
209
let debug_info = s2n_strerror_debug ( code, core:: ptr:: null ( ) ) ;
216
210
@@ -230,15 +224,15 @@ impl Error {
230
224
231
225
pub fn kind ( & self ) -> ErrorType {
232
226
match self . 0 {
233
- Context :: InvalidInput | Context :: MissingWaker => ErrorType :: UsageError ,
227
+ Context :: InvalidInput => ErrorType :: UsageError ,
234
228
Context :: Application ( _) => ErrorType :: Application ,
235
229
Context :: Code ( code, _) => unsafe { ErrorType :: from ( s2n_error_get_type ( code) ) } ,
236
230
}
237
231
}
238
232
239
233
pub fn source ( & self ) -> ErrorSource {
240
234
match self . 0 {
241
- Context :: InvalidInput | Context :: MissingWaker => ErrorSource :: Bindings ,
235
+ Context :: InvalidInput => ErrorSource :: Bindings ,
242
236
Context :: Application ( _) => ErrorSource :: Application ,
243
237
Context :: Code ( _, _) => ErrorSource :: Library ,
244
238
}
@@ -270,7 +264,7 @@ impl Error {
270
264
/// This API is currently incomplete and should not be relied upon.
271
265
pub fn alert ( & self ) -> Option < u8 > {
272
266
match self . 0 {
273
- Context :: InvalidInput | Context :: MissingWaker | Context :: Application ( _) => None ,
267
+ Context :: InvalidInput | Context :: Application ( _) => None ,
274
268
Context :: Code ( code, _) => {
275
269
let mut alert = 0 ;
276
270
let r = unsafe { s2n_error_get_alert ( code, & mut alert) } ;
0 commit comments