Replace .and_then() with .map() wherever it makes sense.
This commit is contained in:
parent
7612c53f9a
commit
21cee25b27
6 changed files with 16 additions and 16 deletions
|
|
@ -49,7 +49,7 @@ impl From<Delay> for Element {
|
|||
fn from(delay: Delay) -> Element {
|
||||
Element::builder("delay")
|
||||
.ns(ns::DELAY)
|
||||
.attr("from", delay.from.and_then(|value| Some(String::from(value))))
|
||||
.attr("from", delay.from.map(String::from))
|
||||
.attr("stamp", delay.stamp.to_rfc3339())
|
||||
.append(delay.data)
|
||||
.build()
|
||||
|
|
|
|||
Loading…
Reference in a new issue