From 4eaae824e2379b8dbcfb1f125753aeaeb60703c5 Mon Sep 17 00:00:00 2001 From: cdricms <36056008+cdricms@users.noreply.github.com> Date: Thu, 9 Oct 2025 17:12:04 +0200 Subject: [PATCH] Init from raw lowercased --- Sources/Units/Units.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Units/Units.swift b/Sources/Units/Units.swift index ca3a83d..ecaddaf 100644 --- a/Sources/Units/Units.swift +++ b/Sources/Units/Units.swift @@ -110,7 +110,7 @@ public enum Unit: String, CaseIterable, CustomStringConvertible, Codable, public init?(rawValue: String) { if let unit = Unit.allCases.first(where: { - $0.rawValue.lowercased() == rawValue + $0.rawValue.lowercased() == rawValue.lowercased() }) { self = unit return