mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
Fix fmt
This commit is contained in:
parent
8d246975d7
commit
34a87e22a8
6 changed files with 27 additions and 31 deletions
|
@ -137,7 +137,7 @@ mod tests {
|
|||
let forwarded = Forwarded::try_from(elem).unwrap();
|
||||
|
||||
let received = Received {
|
||||
forwarded: forwarded,
|
||||
forwarded: forwarded,
|
||||
};
|
||||
|
||||
let serialized: Element = received.into();
|
||||
|
@ -156,7 +156,7 @@ mod tests {
|
|||
let forwarded = Forwarded::try_from(elem).unwrap();
|
||||
|
||||
let sent = Sent {
|
||||
forwarded: forwarded,
|
||||
forwarded: forwarded,
|
||||
};
|
||||
|
||||
let serialized: Element = sent.into();
|
||||
|
|
|
@ -83,14 +83,15 @@ mod tests {
|
|||
.unwrap();
|
||||
let message = Message::try_from(elem).unwrap();
|
||||
|
||||
let elem: Element = "<delay xmlns='urn:xmpp:delay' from='capulet.com' stamp='2002-09-10T23:08:25Z'/>"
|
||||
.parse()
|
||||
.unwrap();
|
||||
let elem: Element =
|
||||
"<delay xmlns='urn:xmpp:delay' from='capulet.com' stamp='2002-09-10T23:08:25Z'/>"
|
||||
.parse()
|
||||
.unwrap();
|
||||
let delay = Delay::try_from(elem).unwrap();
|
||||
|
||||
let forwarded = Forwarded {
|
||||
delay: Some(delay),
|
||||
stanza: Some(message)
|
||||
stanza: Some(message),
|
||||
};
|
||||
|
||||
let serialized: Element = forwarded.into();
|
||||
|
|
|
@ -426,9 +426,9 @@ mod tests {
|
|||
let forwarded = Forwarded::try_from(elem).unwrap();
|
||||
|
||||
let result = Result_ {
|
||||
id: String::from("28482-98726-73623"),
|
||||
queryid: Some(QueryId(String::from("f27"))),
|
||||
forwarded: forwarded,
|
||||
id: String::from("28482-98726-73623"),
|
||||
queryid: Some(QueryId(String::from("f27"))),
|
||||
forwarded: forwarded,
|
||||
};
|
||||
let serialized: Element = result.into();
|
||||
assert_eq!(serialized, reference);
|
||||
|
@ -447,8 +447,8 @@ mod tests {
|
|||
let set = SetResult::try_from(elem).unwrap();
|
||||
|
||||
let fin = Fin {
|
||||
set: set,
|
||||
complete: Complete::default(),
|
||||
set: set,
|
||||
complete: Complete::default(),
|
||||
};
|
||||
let serialized: Element = fin.into();
|
||||
assert_eq!(serialized, reference);
|
||||
|
|
|
@ -695,18 +695,19 @@ mod tests {
|
|||
.unwrap();
|
||||
|
||||
let elem: Element = "<actor xmlns='http://jabber.org/protocol/muc#user' nick='foobar'/>"
|
||||
.parse()
|
||||
.unwrap();
|
||||
.parse()
|
||||
.unwrap();
|
||||
let actor = Actor::try_from(elem).unwrap();
|
||||
|
||||
let elem: Element = "<continue xmlns='http://jabber.org/protocol/muc#user' thread='foobar'/>"
|
||||
.parse()
|
||||
.unwrap();
|
||||
let elem: Element =
|
||||
"<continue xmlns='http://jabber.org/protocol/muc#user' thread='foobar'/>"
|
||||
.parse()
|
||||
.unwrap();
|
||||
let continue_ = Continue::try_from(elem).unwrap();
|
||||
|
||||
let elem: Element = "<reason xmlns='http://jabber.org/protocol/muc#user'>foobar</reason>"
|
||||
.parse()
|
||||
.unwrap();
|
||||
.parse()
|
||||
.unwrap();
|
||||
let reason = Reason::try_from(elem).unwrap();
|
||||
|
||||
let item = Item {
|
||||
|
|
|
@ -698,9 +698,7 @@ mod tests {
|
|||
.parse()
|
||||
.unwrap();
|
||||
|
||||
let elem: Element = "<x xmlns='jabber:x:data' type='submit'/>"
|
||||
.parse()
|
||||
.unwrap();
|
||||
let elem: Element = "<x xmlns='jabber:x:data' type='submit'/>".parse().unwrap();
|
||||
|
||||
let form = DataForm::try_from(elem).unwrap();
|
||||
|
||||
|
@ -720,15 +718,11 @@ mod tests {
|
|||
.parse()
|
||||
.unwrap();
|
||||
|
||||
let elem: Element = "<x xmlns='jabber:x:data' type='submit'/>"
|
||||
.parse()
|
||||
.unwrap();
|
||||
let elem: Element = "<x xmlns='jabber:x:data' type='submit'/>".parse().unwrap();
|
||||
|
||||
let form = DataForm::try_from(elem).unwrap();
|
||||
|
||||
let options = PublishOptions {
|
||||
form: Some(form),
|
||||
};
|
||||
let options = PublishOptions { form: Some(form) };
|
||||
let serialized: Element = options.into();
|
||||
assert_eq!(serialized, reference);
|
||||
}
|
||||
|
|
|
@ -232,14 +232,14 @@ mod tests {
|
|||
.unwrap();
|
||||
|
||||
let elem: Element = "<unexpected-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>"
|
||||
.parse()
|
||||
.unwrap();
|
||||
.parse()
|
||||
.unwrap();
|
||||
|
||||
let error = DefinedCondition::try_from(elem).unwrap();
|
||||
|
||||
let failed = Failed {
|
||||
h: None,
|
||||
error: Some(error),
|
||||
h: None,
|
||||
error: Some(error),
|
||||
};
|
||||
let serialized: Element = failed.into();
|
||||
assert_eq!(serialized, reference);
|
||||
|
|
Loading…
Reference in a new issue