Skip to content

Commit 072f751

Browse files
committed
Fix logic on asserting is_time_duration
1 parent f1154b0 commit 072f751

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/builtins/core/duration.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,7 @@ impl Duration {
175175
#[inline]
176176
#[must_use]
177177
pub(crate) fn is_time_duration(&self) -> bool {
178-
self.time().fields().iter().any(|x| x != &0.0)
179-
&& self.date().fields().iter().all(|x| x == &0.0)
178+
self.date().fields().iter().all(|x| x == &0.0)
180179
}
181180

182181
/// Returns the `TemporalUnit` corresponding to the largest non-zero field.

0 commit comments

Comments
 (0)