Skip to content

Commit

Permalink
chore: cleanup linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 committed Apr 4, 2024
1 parent 2b26806 commit a06b503
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ impl From<FromUtf8Error> for RequestError {
}
}

#[cfg(any(feature = "aio_async_std"))]
#[cfg(feature = "aio_async_std")]
impl From<TimeoutError> for RequestError {
fn from(_err: TimeoutError) -> RequestError {
RequestError::IoError(io::Error::new(io::ErrorKind::TimedOut, "timer failed"))
}
}

#[cfg(any(feature = "aio_tokio"))]
#[cfg(feature = "aio_tokio")]
impl From<Elapsed> for RequestError {
fn from(_err: Elapsed) -> RequestError {
RequestError::IoError(io::Error::new(io::ErrorKind::TimedOut, "timer failed"))
Expand Down Expand Up @@ -388,7 +388,7 @@ impl From<hyper::http::uri::InvalidUri> for SearchError {
}
}

#[cfg(any(feature = "aio_async_std"))]
#[cfg(feature = "aio_async_std")]
impl From<TimeoutError> for SearchError {
fn from(_err: TimeoutError) -> SearchError {
SearchError::IoError(io::Error::new(io::ErrorKind::TimedOut, "timer failed"))
Expand Down Expand Up @@ -452,8 +452,8 @@ pub enum GetGenericPortMappingEntryError {
impl From<RequestError> for GetGenericPortMappingEntryError {
fn from(err: RequestError) -> GetGenericPortMappingEntryError {
match err {
RequestError::ErrorCode(code, _) if code == 606 => GetGenericPortMappingEntryError::ActionNotAuthorized,
RequestError::ErrorCode(code, _) if code == 713 => {
RequestError::ErrorCode(606, _) => GetGenericPortMappingEntryError::ActionNotAuthorized,
RequestError::ErrorCode(713, _) => {
GetGenericPortMappingEntryError::SpecifiedArrayIndexInvalid
}
other => GetGenericPortMappingEntryError::RequestError(other),
Expand Down

0 comments on commit a06b503

Please sign in to comment.