date: Follow clippy and remove a harmful reference.
This commit is contained in:
parent
72ebd21767
commit
f167e8b591
2 changed files with 4 additions and 4 deletions
|
@ -22,8 +22,8 @@ impl DateTime {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a new `DateTime` with a different timezone.
|
/// Returns a new `DateTime` with a different timezone.
|
||||||
pub fn with_timezone(&self, tz: &FixedOffset) -> DateTime {
|
pub fn with_timezone(&self, tz: FixedOffset) -> DateTime {
|
||||||
DateTime(self.0.with_timezone(tz))
|
DateTime(self.0.with_timezone(&tz))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Formats this `DateTime` with the specified format string.
|
/// Formats this `DateTime` with the specified format string.
|
||||||
|
|
|
@ -67,7 +67,7 @@ impl TryFrom<Element> for TimeResult {
|
||||||
|
|
||||||
let tzo = tzo.ok_or(Error::ParseError("Missing tzo child in time element."))?;
|
let tzo = tzo.ok_or(Error::ParseError("Missing tzo child in time element."))?;
|
||||||
let utc = utc.ok_or(Error::ParseError("Missing utc child in time element."))?;
|
let utc = utc.ok_or(Error::ParseError("Missing utc child in time element."))?;
|
||||||
let date = utc.with_timezone(&tzo);
|
let date = utc.with_timezone(tzo);
|
||||||
|
|
||||||
Ok(TimeResult(date))
|
Ok(TimeResult(date))
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ impl From<TimeResult> for Element {
|
||||||
.append(format!("{}", time.0.timezone()))
|
.append(format!("{}", time.0.timezone()))
|
||||||
.build())
|
.build())
|
||||||
.append(Element::builder("utc")
|
.append(Element::builder("utc")
|
||||||
.append(time.0.with_timezone(&FixedOffset::east(0)).format("%FT%TZ"))
|
.append(time.0.with_timezone(FixedOffset::east(0)).format("%FT%TZ"))
|
||||||
.build())
|
.build())
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue