We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87658bb commit 0e65aebCopy full SHA for 0e65aeb
src/tools/tidy/src/features.rs
@@ -259,14 +259,11 @@ pub fn collect_lib_features(base_src_path: &Path) -> Features {
259
260
map_lib_features(base_src_path,
261
&mut |res, _, _| {
262
- match res {
263
- Ok((name, feature)) => {
264
- if lib_features.get(name).is_some() {
265
- return;
266
- }
267
- lib_features.insert(name.to_owned(), feature);
268
- },
269
- Err(_) => (),
+ if let Ok((name, feature)) = res {
+ if lib_features.contains_key(name) {
+ return;
+ }
+ lib_features.insert(name.to_owned(), feature);
270
}
271
});
272
lib_features
0 commit comments