@@ -12,32 +12,51 @@ pub enum DashError {
1212 Reqwest ( reqwest:: Error ) ,
1313 Io ( io:: Error ) ,
1414 Serde ( serde_json:: error:: Error ) ,
15+ SerdePath ( serde_path_to_error:: Error < serde_json:: error:: Error > ) ,
1516 R2d2 ( diesel:: r2d2:: PoolError ) ,
1617 DieselError ( diesel:: result:: Error ) ,
1718 Template ( handlebars:: RenderError ) ,
1819 Misc ( Option < String > ) ,
1920}
2021
2122impl From < handlebars:: RenderError > for DashError {
22- fn from ( e : handlebars:: RenderError ) -> Self { DashError :: Template ( e) }
23+ fn from ( e : handlebars:: RenderError ) -> Self {
24+ DashError :: Template ( e)
25+ }
2326}
2427
2528impl From < reqwest:: Error > for DashError {
26- fn from ( e : reqwest:: Error ) -> Self { DashError :: Reqwest ( e) }
29+ fn from ( e : reqwest:: Error ) -> Self {
30+ DashError :: Reqwest ( e)
31+ }
2732}
2833
2934impl From < io:: Error > for DashError {
30- fn from ( e : io:: Error ) -> Self { DashError :: Io ( e) }
35+ fn from ( e : io:: Error ) -> Self {
36+ DashError :: Io ( e)
37+ }
3138}
3239
3340impl From < serde_json:: error:: Error > for DashError {
34- fn from ( e : serde_json:: error:: Error ) -> Self { DashError :: Serde ( e) }
41+ fn from ( e : serde_json:: error:: Error ) -> Self {
42+ DashError :: Serde ( e)
43+ }
44+ }
45+
46+ impl From < serde_path_to_error:: Error < serde_json:: error:: Error > > for DashError {
47+ fn from ( e : serde_path_to_error:: Error < serde_json:: error:: Error > ) -> Self {
48+ DashError :: SerdePath ( e)
49+ }
3550}
3651
3752impl From < diesel:: r2d2:: PoolError > for DashError {
38- fn from ( e : diesel:: r2d2:: PoolError ) -> Self { DashError :: R2d2 ( e) }
53+ fn from ( e : diesel:: r2d2:: PoolError ) -> Self {
54+ DashError :: R2d2 ( e)
55+ }
3956}
4057
4158impl From < diesel:: result:: Error > for DashError {
42- fn from ( e : diesel:: result:: Error ) -> Self { DashError :: DieselError ( e) }
59+ fn from ( e : diesel:: result:: Error ) -> Self {
60+ DashError :: DieselError ( e)
61+ }
4362}
0 commit comments