From 657f81038c53f817704c61d050f4f3695448d876 Mon Sep 17 00:00:00 2001 From: Lixeas <44436514+Lixeas@users.noreply.github.com> Date: Fri, 25 Sep 2026 09:53:53 +0200 Subject: [PATCH] fix: remove dead nil-coalescing on DateIntervalFormatter.string DateIntervalFormatter.string(from:to:) returns non-optional String, unlike DateFormatter.string(from:) -- the ?? "" was always dead code (compiler warning caught in a real Xcode build). Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Vag2FZvTekVg34kUeb791Q --- NotchWatch/Views/UsageDetailSection.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NotchWatch/Views/UsageDetailSection.swift b/NotchWatch/Views/UsageDetailSection.swift index fdba6a2..41effb2 100644 --- a/NotchWatch/Views/UsageDetailSection.swift +++ b/NotchWatch/Views/UsageDetailSection.swift @@ -84,6 +84,6 @@ struct UsageDetailSection: View { // Template plutot que dateStyle : exclut l'annee (jour + mois seulement) tout en // laissant ICU choisir l'ordre localise ("1-30 sept." FR / "Sep 1 - 30" EN). formatter.dateTemplate = "MMMd" - return formatter.string(from: interval.start, to: lastDay) ?? "" + return formatter.string(from: interval.start, to: lastDay) } }