Skip to content

Commit 1e59c38

Browse files
committed
[ref] cargo clippy & format
1 parent 29a3232 commit 1e59c38

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

crates/package/src/lib.rs

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,22 @@ pub struct Reader {
2121
}
2222

2323
pub 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

Comments
 (0)