diff options
Diffstat (limited to '')
-rw-r--r-- | vendor/gix-attributes/src/parse.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/gix-attributes/src/parse.rs b/vendor/gix-attributes/src/parse.rs index 7d8d6277a..2d90a006d 100644 --- a/vendor/gix-attributes/src/parse.rs +++ b/vendor/gix-attributes/src/parse.rs @@ -1,12 +1,13 @@ use std::borrow::Cow; use bstr::{BStr, ByteSlice}; -use byteyarn::YarnRef; +use kstring::KStringRef; use crate::{name, AssignmentRef, Name, NameRef, StateRef}; /// The kind of attribute that was parsed. #[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)] +#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum Kind { /// A pattern to match paths against Pattern(gix_glob::Pattern), @@ -75,7 +76,7 @@ fn check_attr(attr: &BStr) -> Result<NameRef<'_>, name::Error> { } attr_valid(attr) - .then(|| NameRef(YarnRef::from(attr.to_str().expect("no illformed utf8")))) + .then(|| NameRef(KStringRef::from_ref(attr.to_str().expect("no illformed utf8")))) .ok_or_else(|| name::Error { attribute: attr.into() }) } |