This commit is contained in:
ConnorSkees 2020-04-03 13:33:55 -04:00
parent 2a01668ae0
commit 2efab1cebe

View File

@ -33,7 +33,6 @@ struct SelectorPart {
impl Display for SelectorPart { impl Display for SelectorPart {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
dbg!(&self);
let mut iter = self.inner.iter().peekable(); let mut iter = self.inner.iter().peekable();
devour_whitespace(&mut iter); devour_whitespace(&mut iter);
while let Some(s) = iter.next() { while let Some(s) = iter.next() {
@ -205,13 +204,12 @@ impl Selector {
while let Some(c) = string.pop() { while let Some(c) = string.pop() {
if c == ' ' || c == ',' { if c == ' ' || c == ',' {
continue; continue;
} else { }
string.push(c); string.push(c);
string.push(','); string.push(',');
break; break;
} }
} }
}
'/' => { '/' => {
if toks.peek().is_none() { if toks.peek().is_none() {
return Err("Expected selector.".into()); return Err("Expected selector.".into());
@ -233,12 +231,11 @@ impl Selector {
while let Some(c) = string.pop() { while let Some(c) = string.pop() {
if c == ' ' || c == ',' || c == '\t' { if c == ' ' || c == ',' || c == '\t' {
continue; continue;
} else { }
string.push(c); string.push(c);
string.push(','); string.push(',');
break; break;
} }
}
let mut inner = Vec::new(); let mut inner = Vec::new();
let mut is_invisible = false; let mut is_invisible = false;