From 5f89c0e12984886cf2fbb6f5e6b0c31ca10533a9 Mon Sep 17 00:00:00 2001 From: Kevin Bost Date: Fri, 10 Jul 2026 09:14:55 -0700 Subject: [PATCH] fix: remove incorrect nullability from GetDisplayName return type The GetDisplayName extension method was marked as returning a nullable string, but the implementation always returns a string (falling back to the enum member name if no DisplayAttribute is present). --- src/IntelliTect.Coalesce/Helpers/EnumExtensions.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/IntelliTect.Coalesce/Helpers/EnumExtensions.cs b/src/IntelliTect.Coalesce/Helpers/EnumExtensions.cs index f1871c333..2b38b9bbc 100644 --- a/src/IntelliTect.Coalesce/Helpers/EnumExtensions.cs +++ b/src/IntelliTect.Coalesce/Helpers/EnumExtensions.cs @@ -1,13 +1,11 @@ -using System; using System.ComponentModel.DataAnnotations; -using System.Linq; using System.Reflection; namespace IntelliTect.Coalesce.Helpers; public static class EnumExtensions { - public static string? GetDisplayName(this Enum value) + public static string GetDisplayName(this Enum value) { return value.GetType() .GetMember(value.ToString())