box attribute selector, significantly reducing the size of the simple selector enum
This commit is contained in:
parent
6a83db7404
commit
5f938315dc
@ -264,9 +264,9 @@ impl<'a, 'b> SelectorParser<'a, 'b> {
|
||||
|
||||
fn parse_attribute_selector(&mut self) -> SassResult<SimpleSelector> {
|
||||
self.parser.toks.next();
|
||||
Ok(SimpleSelector::Attribute(Attribute::from_tokens(
|
||||
Ok(SimpleSelector::Attribute(Box::new(Attribute::from_tokens(
|
||||
self.parser,
|
||||
)?))
|
||||
)?)))
|
||||
}
|
||||
|
||||
fn parse_class_selector(&mut self) -> SassResult<SimpleSelector> {
|
||||
|
@ -62,7 +62,7 @@ pub(crate) enum SimpleSelector {
|
||||
/// the given name.
|
||||
Class(String),
|
||||
|
||||
Attribute(Attribute),
|
||||
Attribute(Box<Attribute>),
|
||||
}
|
||||
|
||||
impl fmt::Display for SimpleSelector {
|
||||
|
Loading…
x
Reference in New Issue
Block a user