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
5454 collection: &MetadataCollection,
5555 attribute_names: &mut dyn Iterator<Item = KStringRef<'_>>,
5656 ) {
57− self.initialize(collection);
58−
5957 self.selected.clear();
6058 self.selected.extend(attribute_names.map(|name| {
6159 (
@@ -63,6 +61,8 @@ impl Outcome { · 1 unmodified line
6361 collection.name_to_meta.get(name.as_str()).map(|meta| meta.id),
6462 )
6563 }));
64+
65+ self.initialize(collection);
6666 self.reset_remaining();
6767 }
6868