From 8ef94a7ce124c86323e0f6b42ac9c26d037d787f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Natalie=20Klestrup=20R=C3=B6ijezon?= Date: Fri, 15 Sep 2023 17:43:54 +0200 Subject: [PATCH] DurationUnit doesn't need to be public --- src/duration/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/duration/mod.rs b/src/duration/mod.rs index 854ca5b64..b0df8d0a0 100644 --- a/src/duration/mod.rs +++ b/src/duration/mod.rs @@ -191,7 +191,7 @@ impl Duration { /// [`std::time::Duration`] back to a human-readable format, which is defined /// in the [`Display`] implementation of [`Duration`]. #[derive(Debug, strum::EnumString, strum::Display, strum::AsRefStr, strum::EnumIter)] -pub enum DurationUnit { +enum DurationUnit { #[strum(serialize = "d")] Days, @@ -211,7 +211,7 @@ pub enum DurationUnit { impl DurationUnit { /// Returns the number of whole milliseconds in each supported /// [`DurationUnit`]. - pub fn millis(&self) -> u128 { + fn millis(&self) -> u128 { use DurationUnit::*; match self {