File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -290,15 +290,6 @@ impl ReaderState {
290290 }
291291 }
292292
293- #[ inline]
294- pub fn close_expanded_empty ( & mut self ) -> Result < Event < ' static > > {
295- self . pending = false ;
296- let name = self
297- . opened_buffer
298- . split_off ( self . opened_starts . pop ( ) . unwrap ( ) ) ;
299- Ok ( Event :: End ( BytesEnd :: wrap ( name. into ( ) ) ) )
300- }
301-
302293 /// Get the decoder, used to decode bytes, read by this reader, to the strings.
303294 ///
304295 /// If [`encoding`] feature is enabled, the used encoding may change after
@@ -476,7 +467,11 @@ impl ReaderState {
476467 /// event.
477468 pub fn pending_end ( & mut self ) -> Option < Event < ' static > > {
478469 if self . pending {
479- return Some ( self . close_expanded_empty ( ) . unwrap ( ) ) ;
470+ self . pending = false ;
471+ let name = self
472+ . opened_buffer
473+ . split_off ( self . opened_starts . pop ( ) . unwrap ( ) ) ;
474+ return Some ( Event :: End ( BytesEnd :: wrap ( name. into ( ) ) ) ) ;
480475 }
481476 None
482477 }
You can’t perform that action at this time.
0 commit comments