Skip to content

Commit 2c95b0a

Browse files
committed
Tweak expression to avoid repetition
1 parent ebeef99 commit 2c95b0a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/format/strftime.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,15 @@ impl<'a> StrftimeItems<'a> {
227227
/// ```
228228
#[must_use]
229229
pub const fn new(s: &'a str) -> StrftimeItems<'a> {
230-
#[cfg(not(feature = "unstable-locales"))]
231230
{
232-
StrftimeItems { remainder: s, queue: &[] }
233-
}
234-
#[cfg(feature = "unstable-locales")]
235-
{
236-
StrftimeItems { remainder: s, queue: &[], locale_str: "", locale: None }
231+
StrftimeItems {
232+
remainder: s,
233+
queue: &[],
234+
#[cfg(feature = "unstable-locales")]
235+
locale_str: "",
236+
#[cfg(feature = "unstable-locales")]
237+
locale: None,
238+
}
237239
}
238240
}
239241

0 commit comments

Comments
 (0)