diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:44 +0000 |
commit | c23a457e72abe608715ac76f076f47dc42af07a5 (patch) | |
tree | 2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /vendor/gix-attributes/src/search/mod.rs | |
parent | Releasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip |
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix-attributes/src/search/mod.rs')
-rw-r--r-- | vendor/gix-attributes/src/search/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/gix-attributes/src/search/mod.rs b/vendor/gix-attributes/src/search/mod.rs index e70c3b8b1..f06928bf2 100644 --- a/vendor/gix-attributes/src/search/mod.rs +++ b/vendor/gix-attributes/src/search/mod.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use kstring::KString; +use byteyarn::Yarn; use smallvec::SmallVec; use crate::{Assignment, AssignmentRef}; @@ -89,7 +89,7 @@ pub enum MatchKind { } /// The result of a search, containing all matching attributes. -#[derive(Default)] +#[derive(Default, Clone)] pub struct Outcome { /// The list of all available attributes, by ascending order. Each slots index corresponds to an attribute with that order, i.e. /// `arr[attr.id] = <attr info>`. @@ -99,7 +99,7 @@ pub struct Outcome { /// A stack of attributes to use for processing attributes of matched patterns and for resolving their macros. attrs_stack: SmallVec<[(AttributeId, Assignment, Option<AttributeId>); 8]>, /// A set of attributes we should limit ourselves to, or empty if we should fill in all attributes, made of - selected: SmallVec<[(KString, Option<AttributeId>); AVERAGE_NUM_ATTRS]>, + selected: SmallVec<[(Yarn, Option<AttributeId>); AVERAGE_NUM_ATTRS]>, /// storage for all patterns we have matched so far (in order to avoid referencing them, we copy them, but only once). patterns: RefMap<gix_glob::Pattern>, /// storage for all assignments we have matched so far (in order to avoid referencing them, we copy them, but only once). @@ -135,7 +135,7 @@ pub struct MetadataCollection { /// A mapping of an attribute or macro name to its order, that is the time when it was *first* seen. /// /// This is the inverse of the order attributes are searched. - name_to_meta: HashMap<KString, Metadata>, + name_to_meta: HashMap<Yarn, Metadata>, } /// Metadata associated with an attribute or macro name. |