Skip to content

Commit a2f4b0f

Browse files
committed
remove MissingWaker
1 parent c6f4824 commit a2f4b0f

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

bindings/rust/s2n-tls/src/error.rs

+4-10
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ impl From<libc::c_int> for ErrorType {
4848

4949
enum Context {
5050
InvalidInput,
51-
#[allow(unused)]
52-
MissingWaker,
5351
Code(s2n_status_code::Type, Errno),
5452
Application(Box<dyn std::error::Error + Send + Sync + 'static>),
5553
}
@@ -185,7 +183,6 @@ impl Error {
185183
pub fn name(&self) -> &'static str {
186184
match self.0 {
187185
Context::InvalidInput => "InvalidInput",
188-
Context::MissingWaker => "MissingWaker",
189186
Context::Application(_) => "ApplicationError",
190187
Context::Code(code, _) => unsafe {
191188
// Safety: we assume the string has a valid encoding coming from s2n
@@ -197,9 +194,6 @@ impl Error {
197194
pub fn message(&self) -> &'static str {
198195
match self.0 {
199196
Context::InvalidInput => "A parameter was incorrect",
200-
Context::MissingWaker => {
201-
"Tried to perform an asynchronous operation without a configured waker"
202-
}
203197
Context::Application(_) => "An error occurred while executing application code",
204198
Context::Code(code, _) => unsafe {
205199
// Safety: we assume the string has a valid encoding coming from s2n
@@ -210,7 +204,7 @@ impl Error {
210204

211205
pub fn debug(&self) -> Option<&'static str> {
212206
match self.0 {
213-
Context::InvalidInput | Context::MissingWaker | Context::Application(_) => None,
207+
Context::InvalidInput | Context::Application(_) => None,
214208
Context::Code(code, _) => unsafe {
215209
let debug_info = s2n_strerror_debug(code, core::ptr::null());
216210

@@ -230,15 +224,15 @@ impl Error {
230224

231225
pub fn kind(&self) -> ErrorType {
232226
match self.0 {
233-
Context::InvalidInput | Context::MissingWaker => ErrorType::UsageError,
227+
Context::InvalidInput => ErrorType::UsageError,
234228
Context::Application(_) => ErrorType::Application,
235229
Context::Code(code, _) => unsafe { ErrorType::from(s2n_error_get_type(code)) },
236230
}
237231
}
238232

239233
pub fn source(&self) -> ErrorSource {
240234
match self.0 {
241-
Context::InvalidInput | Context::MissingWaker => ErrorSource::Bindings,
235+
Context::InvalidInput => ErrorSource::Bindings,
242236
Context::Application(_) => ErrorSource::Application,
243237
Context::Code(_, _) => ErrorSource::Library,
244238
}
@@ -270,7 +264,7 @@ impl Error {
270264
/// This API is currently incomplete and should not be relied upon.
271265
pub fn alert(&self) -> Option<u8> {
272266
match self.0 {
273-
Context::InvalidInput | Context::MissingWaker | Context::Application(_) => None,
267+
Context::InvalidInput | Context::Application(_) => None,
274268
Context::Code(code, _) => {
275269
let mut alert = 0;
276270
let r = unsafe { s2n_error_get_alert(code, &mut alert) };

0 commit comments

Comments
 (0)