Skip to content

Commit 60cd20d

Browse files
committed
[ref] cargo clippy & format
1 parent b743919 commit 60cd20d

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

crates/package/src/lib.rs

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -95,23 +95,23 @@ impl Reader {
9595
let flow_types: Vec<FlowType> = self.collect_definitions(&flow_types_path)?;
9696

9797
let functions_path = path.join("runtime_definition");
98-
let functions = match self.collect_definitions::<RuntimeFunctionDefinition>(&functions_path) {
99-
Ok(func) => {
100-
func.into_iter()
98+
let functions =
99+
match self.collect_definitions::<RuntimeFunctionDefinition>(&functions_path) {
100+
Ok(func) => func
101+
.into_iter()
101102
.filter(|v| v.version == self.accepted_version)
102-
.collect()
103-
},
104-
Err(err) => {
105-
if self.should_break {
106-
return Err(ReaderError::ReadFeatureError {
107-
path: functions_path.to_string_lossy().to_string(),
108-
source: Box::new(err),
109-
})
110-
} else {
111-
continue;
103+
.collect(),
104+
Err(err) => {
105+
if self.should_break {
106+
return Err(ReaderError::ReadFeatureError {
107+
path: functions_path.to_string_lossy().to_string(),
108+
source: Box::new(err),
109+
});
110+
} else {
111+
continue;
112+
}
112113
}
113-
}
114-
};
114+
};
115115

116116
let feature = Feature {
117117
name: feature_name,
@@ -162,11 +162,7 @@ impl Reader {
162162
error: e,
163163
});
164164
} else {
165-
log::warn!(
166-
"Skipping invalid JSON file {}: {}",
167-
path.display(),
168-
e
169-
);
165+
log::warn!("Skipping invalid JSON file {}: {}", path.display(), e);
170166
}
171167
}
172168
}

0 commit comments

Comments
 (0)