summaryrefslogtreecommitdiffstats
path: root/vendor/gix-attributes/src/search/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gix-attributes/src/search/mod.rs')
-rw-r--r--vendor/gix-attributes/src/search/mod.rs8
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.