mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
rsm: Rename First id to make it more explicit.
This commit is contained in:
parent
2b8bcebfd9
commit
967d4af843
1 changed files with 3 additions and 3 deletions
|
@ -15,7 +15,7 @@ use ns;
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct First {
|
pub struct First {
|
||||||
pub index: Option<usize>,
|
pub index: Option<usize>,
|
||||||
pub base: String,
|
pub id: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
@ -68,7 +68,7 @@ impl<'a> TryFrom<&'a Element> for Set {
|
||||||
Some(index) => Some(index.parse()?),
|
Some(index) => Some(index.parse()?),
|
||||||
None => None,
|
None => None,
|
||||||
},
|
},
|
||||||
base: child.text(),
|
id: child.text(),
|
||||||
});
|
});
|
||||||
} else if child.is("index", ns::RSM) {
|
} else if child.is("index", ns::RSM) {
|
||||||
if index.is_some() {
|
if index.is_some() {
|
||||||
|
@ -123,7 +123,7 @@ impl<'a> Into<Element> for &'a Set {
|
||||||
Some(index) => Some(format!("{}", index)),
|
Some(index) => Some(format!("{}", index)),
|
||||||
None => None,
|
None => None,
|
||||||
})
|
})
|
||||||
.append(first.base.clone()).build());
|
.append(first.id.clone()).build());
|
||||||
}
|
}
|
||||||
if self.index.is_some() {
|
if self.index.is_some() {
|
||||||
elem.append_child(Element::builder("index").ns(ns::RSM).append(format!("{}", self.index.unwrap())).build());
|
elem.append_child(Element::builder("index").ns(ns::RSM).append(format!("{}", self.index.unwrap())).build());
|
||||||
|
|
Loading…
Reference in a new issue