File tree Expand file tree Collapse file tree
crates/devolutions-pedm/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ impl core::error::Error for ServeError {
227227 Self :: TokioIo ( e) => Some ( e) ,
228228 Self :: AppState ( e) => Some ( e) ,
229229 Self :: Db ( e) => Some ( e) ,
230- Self :: Anyhow ( e) => Some ( e) ,
230+ Self :: Other ( e) => Some ( e. as_ref ( ) ) ,
231231 }
232232 }
233233}
@@ -238,7 +238,7 @@ impl fmt::Display for ServeError {
238238 Self :: TokioIo ( e) => e. fmt ( f) ,
239239 Self :: AppState ( e) => e. fmt ( f) ,
240240 Self :: Db ( e) => e. fmt ( f) ,
241- Self :: Anyhow ( s ) => e. fmt ( f) ,
241+ Self :: Other ( e ) => e. fmt ( f) ,
242242 }
243243 }
244244}
@@ -260,7 +260,7 @@ impl From<DbError> for ServeError {
260260}
261261impl From < anyhow:: Error > for ServeError {
262262 fn from ( e : anyhow:: Error ) -> Self {
263- Self :: Anyhow ( e . to_string ( ) )
263+ Self :: Other ( e )
264264 }
265265}
266266
Original file line number Diff line number Diff line change @@ -356,7 +356,7 @@ impl core::error::Error for LoadPolicyError {
356356 match self {
357357 Self :: Io ( e, _) => Some ( e) ,
358358 Self :: Json ( e) => Some ( e) ,
359- Self :: Other ( e) => Some ( e) ,
359+ Self :: Other ( e) => Some ( e. as_ref ( ) ) ,
360360 }
361361 }
362362}
@@ -366,7 +366,7 @@ impl fmt::Display for LoadPolicyError {
366366 match self {
367367 Self :: Io ( e, path) => write ! ( f, "IO error while loading policy at {path}: {e}" ) ,
368368 Self :: Json ( e) => e. fmt ( f) ,
369- Self :: Other ( s ) => e. fmt ( f) ,
369+ Self :: Other ( e ) => e. fmt ( f) ,
370370 }
371371 }
372372}
@@ -378,7 +378,7 @@ impl From<serde_json::Error> for LoadPolicyError {
378378}
379379impl From < anyhow:: Error > for LoadPolicyError {
380380 fn from ( e : anyhow:: Error ) -> Self {
381- Self :: Other ( e. to_string ( ) )
381+ Self :: Other ( e)
382382 }
383383}
384384
You can’t perform that action at this time.
0 commit comments