diff --git a/src/resolver/resolver_error.rs b/src/resolver/resolver_error.rs index cf144979..18c5a935 100644 --- a/src/resolver/resolver_error.rs +++ b/src/resolver/resolver_error.rs @@ -57,3 +57,15 @@ impl From 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()), + } + } +}