ecaps2, jingle_s5b: Replace drain() with into_iter().
This commit is contained in:
parent
7511ca46c5
commit
4b3ced042e
2 changed files with 5 additions and 5 deletions
|
@ -49,10 +49,10 @@ impl TryFrom<Element> for ECaps2 {
|
|||
}
|
||||
|
||||
impl From<ECaps2> for Element {
|
||||
fn from(mut ecaps2: ECaps2) -> Element {
|
||||
fn from(ecaps2: ECaps2) -> Element {
|
||||
Element::builder("c")
|
||||
.ns(ns::ECAPS2)
|
||||
.append(ecaps2.hashes.drain(..)
|
||||
.append(ecaps2.hashes.into_iter()
|
||||
.map(Element::from)
|
||||
.collect::<Vec<_>>())
|
||||
.build()
|
||||
|
|
|
@ -145,8 +145,8 @@ impl From<Transport> for Element {
|
|||
.attr("dstaddr", transport.dstaddr)
|
||||
.attr("mode", transport.mode)
|
||||
.append(match transport.payload {
|
||||
TransportPayload::Candidates(mut candidates) => {
|
||||
candidates.drain(..)
|
||||
TransportPayload::Candidates(candidates) => {
|
||||
candidates.into_iter()
|
||||
.map(Element::from)
|
||||
.collect::<Vec<_>>()
|
||||
},
|
||||
|
@ -161,7 +161,7 @@ impl From<Transport> for Element {
|
|||
.ns(ns::JINGLE_S5B)
|
||||
.build())
|
||||
},
|
||||
TransportPayload::CandidateUsed(ref cid) => {
|
||||
TransportPayload::CandidateUsed(cid) => {
|
||||
vec!(Element::builder("candidate-used")
|
||||
.ns(ns::JINGLE_S5B)
|
||||
.attr("cid", cid)
|
||||
|
|
Loading…
Reference in a new issue