File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -336,20 +336,20 @@ impl From<url::ParseError> for Error {
336336}
337337
338338impl From < mongodb:: error:: Error > for Error {
339- fn from ( value : mongodb:: error:: Error ) -> Self {
340- Self :: new ( Code :: Internal , value . to_string ( ) )
339+ fn from ( err : mongodb:: error:: Error ) -> Self {
340+ Self :: from_std_err ( Code :: Internal , & err )
341341 }
342342}
343343
344344impl From < reqwest:: Error > for Error {
345- fn from ( value : reqwest:: Error ) -> Self {
346- Self :: new ( Code :: Internal , value . to_string ( ) )
345+ fn from ( err : reqwest:: Error ) -> Self {
346+ Self :: from_std_err ( Code :: Internal , & err )
347347 }
348348}
349349
350350impl From < zip:: result:: ZipError > for Error {
351- fn from ( value : zip:: result:: ZipError ) -> Self {
352- Self :: new ( Code :: Internal , value . to_string ( ) )
351+ fn from ( err : zip:: result:: ZipError ) -> Self {
352+ Self :: from_std_err ( Code :: Internal , & err )
353353 }
354354}
355355
You can’t perform that action at this time.
0 commit comments