Remove the MessagePayload trait, it was a bad idea.
This commit is contained in:
parent
b8b0494c19
commit
a9993b1281
3 changed files with 8 additions and 11 deletions
|
|
@ -1,7 +1,6 @@
|
|||
use minidom::Element;
|
||||
|
||||
use error::Error;
|
||||
use super::MessagePayload;
|
||||
|
||||
// TODO: also support components and servers.
|
||||
use ns::JABBER_CLIENT_NS;
|
||||
|
|
@ -11,8 +10,6 @@ pub struct Body {
|
|||
body: String,
|
||||
}
|
||||
|
||||
impl MessagePayload for Body {}
|
||||
|
||||
pub fn parse_body(root: &Element) -> Result<Body, Error> {
|
||||
if !root.is("body", JABBER_CLIENT_NS) {
|
||||
return Err(Error::ParseError("This is not a body element."));
|
||||
|
|
|
|||
Loading…
Reference in a new issue