@@ -21,10 +21,22 @@ pub struct Reader {
2121}
2222
2323pub enum ReaderError {
24- JsonError { path : PathBuf , error : serde_json:: Error } ,
25- ReadFeatureError { path : String , source : Box < ReaderError > } ,
26- ReadDirectoryError { path : PathBuf , error : io:: Error } ,
27- ReadFileError { path : PathBuf , error : io:: Error } ,
24+ JsonError {
25+ path : PathBuf ,
26+ error : serde_json:: Error ,
27+ } ,
28+ ReadFeatureError {
29+ path : String ,
30+ source : Box < ReaderError > ,
31+ } ,
32+ ReadDirectoryError {
33+ path : PathBuf ,
34+ error : io:: Error ,
35+ } ,
36+ ReadFileError {
37+ path : PathBuf ,
38+ error : io:: Error ,
39+ } ,
2840 DirectoryEntryError ( io:: Error ) ,
2941}
3042
@@ -79,13 +91,15 @@ impl Reader {
7991 . to_string ( ) ;
8092
8193 let data_types_path = path. join ( "data_type" ) ;
82- let data_types: Vec < DefinitionDataType > = self . collect_definitions ( & data_types_path) ?;
94+ let data_types: Vec < DefinitionDataType > =
95+ self . collect_definitions ( & data_types_path) ?;
8396
8497 let flow_types_path = path. join ( "flow_type" ) ;
8598 let flow_types: Vec < FlowType > = self . collect_definitions ( & flow_types_path) ?;
8699
87100 let functions_path = path. join ( "runtime_definition" ) ;
88- let functions: Vec < RuntimeFunctionDefinition > = self . collect_definitions ( & functions_path) ?;
101+ let functions: Vec < RuntimeFunctionDefinition > =
102+ self . collect_definitions ( & functions_path) ?;
89103
90104 let feature = Feature {
91105 name : feature_name,
@@ -122,7 +136,7 @@ impl Reader {
122136 return Err ( ReaderError :: ReadFileError {
123137 path : path. to_path_buf ( ) ,
124138 error : err,
125- } )
139+ } ) ;
126140 }
127141 } ;
128142
0 commit comments