Use while let instead of while and if let
@@ -51,8 +51,7 @@ impl<'s> GenerateDataDrivenDependencyMetadata<'s> {
let mut module_entries: ModuleEntries = Default::default();
- while !processing_queue.is_empty() {
- if let Some(processing_item) = processing_queue.pop() {
+ while let Some(processing_item) = processing_queue.pop() {
for selection in processing_item.selections {
match selection {
Selection::ScalarField(_) | Selection::FragmentSpread(_) => {}
@@ -146,7 +145,6 @@ impl<'s> GenerateDataDrivenDependencyMetadata<'s> {
}
}
}
- }
if !module_entries.is_empty() {
Some(create_metadata_directive(module_entries))
