From 9c3b87bf0315db6ef5107e26452cb5bfb4dffcff Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Fri, 3 Dec 2021 10:26:54 +0100 Subject: rename internal emit_error to push_error (to avoid confusion with trait method) --- src/emitter.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/emitter.rs b/src/emitter.rs index e0ee8d9..fe98c43 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -219,12 +219,12 @@ impl DefaultEmitter { vacant.insert(v); } Entry::Occupied(_) => { - self.emit_error(Error::DuplicateAttribute); + self.push_error(Error::DuplicateAttribute); } }, Some(Token::EndTag(_)) => { if !self.seen_attributes.insert(k) { - self.emit_error(Error::DuplicateAttribute); + self.push_error(Error::DuplicateAttribute); } } _ => { @@ -243,7 +243,7 @@ impl DefaultEmitter { self.emit_token(Token::String(s)); } - fn emit_error(&mut self, error: Error) { + fn push_error(&mut self, error: Error) { // bypass character flushing in self.emit_token: we don't need the error location to be // that exact self.emitted_tokens @@ -265,7 +265,7 @@ impl Emitter for DefaultEmitter { } fn emit_error(&mut self, error: Error, _reader: &R) { - self.emit_error(error); + self.push_error(error); } fn pop_token(&mut self) -> Option { @@ -293,7 +293,7 @@ impl Emitter for DefaultEmitter { match token { Token::EndTag(_) => { if !self.seen_attributes.is_empty() { - self.emit_error(Error::EndTagWithAttributes); + self.push_error(Error::EndTagWithAttributes); } self.seen_attributes.clear(); } @@ -326,7 +326,7 @@ impl Emitter for DefaultEmitter { *self_closing = true; } Token::EndTag(_) => { - self.emit_error(Error::EndTagWithTrailingSolidus); + self.push_error(Error::EndTagWithTrailingSolidus); } _ => { debug_assert!(false); -- cgit v1.2.3