Skip to content

Commit

Permalink
add: clone for resolver errors
Browse files Browse the repository at this point in the history
  • Loading branch information
justRkive committed Nov 14, 2023
1 parent a009682 commit f53d256
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/resolver/resolver_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,15 @@ impl From<ClientError> for ResolverError {
}

}

impl Clone for ResolverError {
fn clone(&self) -> Self {
match self {
ResolverError::Io(io) => Self::from(std::io::Error::from(io.kind())),
ResolverError::Message(err) => ResolverError::Message(err),
ResolverError::EmptyQuery => ResolverError::EmptyQuery,
ResolverError::RetriesLimitExceeded => ResolverError::RetriesLimitExceeded,
ResolverError::Parse(err) => ResolverError::Parse(err.to_string()),
}
}
}

0 comments on commit f53d256

Please sign in to comment.