xmlstream: fix crash

Jonas Schäfer created

This happened when (a bit too hastily) applying suggestions from a
review.

Change summary

tokio-xmpp/src/xmlstream/capture.rs | 1 -
1 file changed, 1 deletion(-)

Detailed changes

tokio-xmpp/src/xmlstream/capture.rs 🔗

@@ -88,7 +88,6 @@ impl<T> CaptureBufRead<T> {
         let this = self.project();
         let (buf, consumed_up_to) = this.buf.as_mut()?;
         let result = buf.drain(..*consumed_up_to).collect();
-        buf.drain(..*consumed_up_to);
         *consumed_up_to = 0;
         Some(result)
     }