switch from rustxml to minidom, doesn't work
This commit is contained in:
parent
fa08591162
commit
d4bd64370c
11 changed files with 241 additions and 205 deletions
|
|
@ -1,10 +1,10 @@
|
|||
use xml;
|
||||
use minidom::Element;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Event {
|
||||
Online,
|
||||
Disconnected,
|
||||
Stanza(xml::Element),
|
||||
Stanza(Element),
|
||||
}
|
||||
|
||||
impl Event {
|
||||
|
|
@ -17,12 +17,12 @@ impl Event {
|
|||
|
||||
pub fn is_stanza(&self, name: &str) -> bool {
|
||||
match self {
|
||||
&Event::Stanza(ref stanza) => stanza.name == name,
|
||||
&Event::Stanza(ref stanza) => stanza.name() == name,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_stanza(&self) -> Option<&xml::Element> {
|
||||
pub fn as_stanza(&self) -> Option<&Element> {
|
||||
match self {
|
||||
&Event::Stanza(ref stanza) => Some(stanza),
|
||||
_ => None,
|
||||
|
|
|
|||
Loading…
Reference in a new issue