Skip to content

Commit

Permalink
remove: some more unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Velfi committed Mar 10, 2023
1 parent 95f7d89 commit 865d670
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 109 deletions.
17 changes: 2 additions & 15 deletions rust-runtime/aws-smithy-http/src/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use crate::operation;
use aws_smithy_types::error::metadata::{ProvideErrorMetadata, EMPTY_ERROR_METADATA};
use aws_smithy_types::error::ErrorMetadata;
use aws_smithy_types::error::InterceptorError;
use aws_smithy_types::retry::ErrorKind;
use std::fmt;
use std::fmt::{Debug, Display, Formatter};
Expand Down Expand Up @@ -72,7 +71,7 @@ pub mod builders {
source_only_error_builder!(TimeoutError, TimeoutErrorBuilder, BoxError);
source_only_error_builder!(DispatchFailure, DispatchFailureBuilder, ConnectorError);

/// Builder for [`ResponseError`](super::ResponseError).
/// Builder for [`ResponseError`](ResponseError).
#[derive(Debug)]
pub struct ResponseErrorBuilder<R> {
source: Option<BoxError>,
Expand Down Expand Up @@ -127,7 +126,7 @@ pub mod builders {
}
}

/// Builder for [`ServiceError`](super::ServiceError).
/// Builder for [`ServiceError`](ServiceError).
#[derive(Debug)]
pub struct ServiceErrorBuilder<E, R> {
source: Option<E>,
Expand Down Expand Up @@ -340,9 +339,6 @@ pub enum SdkError<E, R = operation::Response> {

/// An error response was received from the service
ServiceError(ServiceError<E, R>),

/// An error occurred within a smithy interceptor
InterceptorError(InterceptorError),
}

impl<E, R> SdkError<E, R> {
Expand Down Expand Up @@ -378,11 +374,6 @@ impl<E, R> SdkError<E, R> {
Self::ServiceError(ServiceError { source, raw })
}

/// Construct a `SdkError` for a smithy interceptor failure
pub fn interceptor_error(source: InterceptorError) -> Self {
Self::InterceptorError(source)
}

/// Returns the underlying service error `E` if there is one
///
/// If the `SdkError` is not a `ServiceError` (for example, the error is a network timeout),
Expand Down Expand Up @@ -440,7 +431,6 @@ impl<E, R> SdkError<E, R> {
ResponseError(context) => Ok(context.source),
DispatchFailure(context) => Ok(context.source.into()),
ServiceError(context) => Ok(context.source.into()),
InterceptorError(context) => Ok(context.into()),
}
}
}
Expand All @@ -453,7 +443,6 @@ impl<E, R> Display for SdkError<E, R> {
SdkError::DispatchFailure(_) => write!(f, "dispatch failure"),
SdkError::ResponseError(_) => write!(f, "response error"),
SdkError::ServiceError(_) => write!(f, "service error"),
SdkError::InterceptorError(_) => write!(f, "an error occurred in a smithy interceptor"),
}
}
}
Expand All @@ -471,7 +460,6 @@ where
ResponseError(context) => Some(context.source.as_ref()),
DispatchFailure(context) => Some(&context.source),
ServiceError(context) => Some(&context.source),
InterceptorError(context) => Some(context),
}
}
}
Expand All @@ -487,7 +475,6 @@ where
Self::DispatchFailure(_) => &EMPTY_ERROR_METADATA,
Self::ResponseError(_) => &EMPTY_ERROR_METADATA,
Self::ServiceError(err) => err.source.meta(),
Self::InterceptorError(_) => &EMPTY_ERROR_METADATA,
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions rust-runtime/aws-smithy-types/src/config.rs

This file was deleted.

89 changes: 0 additions & 89 deletions rust-runtime/aws-smithy-types/src/number/error.rs

This file was deleted.

2 changes: 1 addition & 1 deletion rust-runtime/aws-smithy-types/src/retry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub trait ProvideErrorKind {
/// - The required retry delay exceeds the maximum backoff configured by the client
/// - No retry tokens are available due to service health
#[non_exhaustive]
#[derive(Eq, PartialEq, Debug, Clone)]
#[derive(Eq, PartialEq, Debug)]
pub enum RetryKind {
/// Retry the associated request due to a known `ErrorKind`.
Error(ErrorKind),
Expand Down

0 comments on commit 865d670

Please sign in to comment.