Fix a stupid copy/paste syntax error.
This commit is contained in:
parent
fc7a0517d3
commit
b8b0494c19
5 changed files with 5 additions and 5 deletions
|
@ -53,7 +53,7 @@ pub struct DataForm {
|
||||||
|
|
||||||
pub fn parse_data_form(root: &Element) -> Result<DataForm, Error> {
|
pub fn parse_data_form(root: &Element) -> Result<DataForm, Error> {
|
||||||
if !root.is("x", DATA_FORMS_NS) {
|
if !root.is("x", DATA_FORMS_NS) {
|
||||||
return Err(Error::ParseError("This is not a data form element.")),
|
return Err(Error::ParseError("This is not a data form element."));
|
||||||
}
|
}
|
||||||
|
|
||||||
let type_: DataFormType = match root.attr("type") {
|
let type_: DataFormType = match root.attr("type") {
|
||||||
|
|
|
@ -30,7 +30,7 @@ pub struct Disco {
|
||||||
|
|
||||||
pub fn parse_disco(root: &Element) -> Result<Disco, Error> {
|
pub fn parse_disco(root: &Element) -> Result<Disco, Error> {
|
||||||
if !root.is("query", DISCO_INFO_NS) {
|
if !root.is("query", DISCO_INFO_NS) {
|
||||||
return Err(Error::ParseError("This is not a disco#info element.")),
|
return Err(Error::ParseError("This is not a disco#info element."));
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut identities: Vec<Identity> = vec!();
|
let mut identities: Vec<Identity> = vec!();
|
||||||
|
|
|
@ -210,7 +210,7 @@ pub struct Jingle {
|
||||||
|
|
||||||
pub fn parse_jingle(root: &Element) -> Result<Jingle, Error> {
|
pub fn parse_jingle(root: &Element) -> Result<Jingle, Error> {
|
||||||
if !root.is("jingle", JINGLE_NS) {
|
if !root.is("jingle", JINGLE_NS) {
|
||||||
return Err(Error::ParseError("This is not a Jingle element.")),
|
return Err(Error::ParseError("This is not a Jingle element."));
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut contents: Vec<Content> = vec!();
|
let mut contents: Vec<Content> = vec!();
|
||||||
|
|
|
@ -19,7 +19,7 @@ pub struct MediaElement {
|
||||||
|
|
||||||
pub fn parse_media_element(root: &Element) -> Result<MediaElement, Error> {
|
pub fn parse_media_element(root: &Element) -> Result<MediaElement, Error> {
|
||||||
if !root.is("media", MEDIA_ELEMENT_NS) {
|
if !root.is("media", MEDIA_ELEMENT_NS) {
|
||||||
return Err(Error::ParseError("This is not a media element.")),
|
return Err(Error::ParseError("This is not a media element."));
|
||||||
}
|
}
|
||||||
|
|
||||||
let width = root.attr("width").and_then(|width| width.parse().ok());
|
let width = root.attr("width").and_then(|width| width.parse().ok());
|
||||||
|
|
|
@ -10,7 +10,7 @@ pub struct Ping {
|
||||||
|
|
||||||
pub fn parse_ping(root: &Element) -> Result<Ping, Error> {
|
pub fn parse_ping(root: &Element) -> Result<Ping, Error> {
|
||||||
if !root.is("ping", PING_NS) {
|
if !root.is("ping", PING_NS) {
|
||||||
return Err(Error::ParseError("This is not a ping element.")),
|
return Err(Error::ParseError("This is not a ping element."));
|
||||||
}
|
}
|
||||||
|
|
||||||
for _ in root.children() {
|
for _ in root.children() {
|
||||||
|
|
Loading…
Reference in a new issue