From ead6ea6289fa95254508f2eadac642f8d8898774 Mon Sep 17 00:00:00 2001 From: PoiScript Date: Wed, 30 Oct 2019 14:03:47 +0800 Subject: [PATCH] fix(elements): satisfy the borrow checker --- src/elements/title.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/elements/title.rs b/src/elements/title.rs index 7969c94..af8b0f2 100644 --- a/src/elements/title.rs +++ b/src/elements/title.rs @@ -62,17 +62,17 @@ impl Title<'_> { /// Returns this headline's closed timestamp, or `None` if not set. pub fn closed(&self) -> Option<&Timestamp> { - self.planning.and_then(|p| p.closed.as_ref()) + self.planning.as_ref().and_then(|p| p.closed.as_ref()) } /// Returns this headline's scheduled timestamp, or `None` if not set. pub fn scheduled(&self) -> Option<&Timestamp> { - self.planning.and_then(|p| p.scheduled.as_ref()) + self.planning.as_ref().and_then(|p| p.scheduled.as_ref()) } /// Returns this headline's deadline timestamp, or `None` if not set. pub fn deadline(&self) -> Option<&Timestamp> { - self.planning.and_then(|p| p.deadline.as_ref()) + self.planning.as_ref().and_then(|p| p.deadline.as_ref()) } /// Returns `true` if this headline is archived