History

more correct initialization order for new attribute search outcomes.

An attribute selection affects the initialization, hence it should be added first.

Sebastian Thiel committed 2 years ago

Commit 7d754cc1 parent c74c7fe1 file · +2 −2Browse files

Unified · Split

gix-attributes/src/search/outcome.rs+2−2
@@ -54,8 +54,6 @@ impl Outcome { · 53 unmodified lines
54 collection: &MetadataCollection,54 collection: &MetadataCollection,
55 attribute_names: &mut dyn Iterator<Item = KStringRef<'_>>,55 attribute_names: &mut dyn Iterator<Item = KStringRef<'_>>,
56 ) {56 ) {
57 self.initialize(collection);
58
59 self.selected.clear();57 self.selected.clear();
60 self.selected.extend(attribute_names.map(|name| {58 self.selected.extend(attribute_names.map(|name| {
61 (59 (
@@ -63,6 +61,8 @@ impl Outcome { · 1 unmodified line
63 collection.name_to_meta.get(name.as_str()).map(|meta| meta.id),61 collection.name_to_meta.get(name.as_str()).map(|meta| meta.id),
64 )62 )
65 }));63 }));
64
65 self.initialize(collection);
66 self.reset_remaining();66 self.reset_remaining();
67 }67 }
68 68