diff options
| author | Martin Fischer <martin@push-f.com> | 2021-12-03 10:26:54 +0100 | 
|---|---|---|
| committer | Martin Fischer <martin@push-f.com> | 2021-12-05 02:52:36 +0100 | 
| commit | 9c3b87bf0315db6ef5107e26452cb5bfb4dffcff (patch) | |
| tree | d7e28819a6f83448528eb378ff6304d613248623 /src | |
| parent | 0b32dce1dad570268a641e07c003913bdde4c54e (diff) | |
rename internal emit_error to push_error (to avoid confusion with trait method)
Diffstat (limited to 'src')
| -rw-r--r-- | src/emitter.rs | 12 | 
1 files changed, 6 insertions, 6 deletions
| 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<R> DefaultEmitter<R, ()> {                          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<R> DefaultEmitter<R, ()> {          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<R> Emitter<R> for DefaultEmitter<R, ()> {      }      fn emit_error(&mut self, error: Error, _reader: &R) { -        self.emit_error(error); +        self.push_error(error);      }      fn pop_token(&mut self) -> Option<Self::Token> { @@ -293,7 +293,7 @@ impl<R> Emitter<R> for DefaultEmitter<R, ()> {          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<R> Emitter<R> for DefaultEmitter<R, ()> {                  *self_closing = true;              }              Token::EndTag(_) => { -                self.emit_error(Error::EndTagWithTrailingSolidus); +                self.push_error(Error::EndTagWithTrailingSolidus);              }              _ => {                  debug_assert!(false); | 
