From f488bcfdb5d166f1aae421e94c84ea69a80bd169 Mon Sep 17 00:00:00 2001 From: Kartavya Vashishtha Date: Fri, 23 Aug 2024 10:03:12 -0400 Subject: [PATCH] fix: there are 10 units, not 9 --- components/experimental/src/duration/format.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/experimental/src/duration/format.rs b/components/experimental/src/duration/format.rs index abf252d5cf6..7cc912279d9 100644 --- a/components/experimental/src/duration/format.rs +++ b/components/experimental/src/duration/format.rs @@ -449,10 +449,10 @@ impl<'a> FormattedDuration<'a> { &self, sink: &mut V, ) -> core::fmt::Result { - // We can have a maximum of 9 writeables (one FormattedUnit for each unit). + // We can have a maximum of 10 writeables (one FormattedUnit for each unit). // In the digital case, one or more unit is represented by the FormattedDigitalDuration, // which is a single writeable. - let mut parts_list: SmallVec<[HeterogenousToFormatter; 9]> = SmallVec::new(); + let mut parts_list: SmallVec<[HeterogenousToFormatter; 10]> = SmallVec::new(); // 2. Let signDisplayed be true. let mut sign_displayed = true;