mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
Update xml5ever.
This commit is contained in:
parent
956193e0da
commit
c6ab5a22b8
2 changed files with 5 additions and 2 deletions
|
@ -17,7 +17,7 @@ tokio = "0.1"
|
|||
tokio-io = "0.1"
|
||||
tokio-codec = "0.1"
|
||||
bytes = "0.4"
|
||||
xml5ever = "0.12"
|
||||
xml5ever = "0.14"
|
||||
native-tls = "0.2"
|
||||
tokio-tls = "0.2"
|
||||
sasl = "0.4"
|
||||
|
|
|
@ -18,6 +18,7 @@ use std::borrow::Cow;
|
|||
use tokio_codec::{Decoder, Encoder};
|
||||
use xml5ever::interface::Attribute;
|
||||
use xml5ever::tokenizer::{Tag, TagKind, Token, TokenSink, XmlTokenizer};
|
||||
use xml5ever::buffer_queue::BufferQueue;
|
||||
|
||||
/// Anything that can be sent or received on an XMPP/XML stream
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
|
@ -231,8 +232,10 @@ impl Decoder for XMPPCodec {
|
|||
Ok(s) => {
|
||||
if !s.is_empty() {
|
||||
// println!("<< {}", s);
|
||||
let mut buffer_queue = BufferQueue::new();
|
||||
let tendril = FromIterator::from_iter(s.chars());
|
||||
self.parser.feed(tendril);
|
||||
buffer_queue.push_back(tendril);
|
||||
self.parser.feed(&mut buffer_queue);
|
||||
}
|
||||
}
|
||||
// Remedies for truncated utf8
|
||||
|
|
Loading…
Reference in a new issue