Introduce AttrValue::atom().

This commit is contained in:
Ms2ger 2015-04-25 15:13:03 +02:00
parent f010c83313
commit 4108af0c11
2 changed files with 9 additions and 2 deletions

View file

@ -70,6 +70,13 @@ impl AttrValue {
_ => None
}
}
pub fn atom<'a>(&'a self) -> Option<&'a Atom> {
match *self {
AttrValue::Atom(ref value) => Some(value),
_ => None
}
}
}
impl Str for AttrValue {