From c6a4b91c271b7c29ce2aeba7688febadb7019fed Mon Sep 17 00:00:00 2001 From: John Colvin Date: Tue, 18 Nov 2025 11:50:15 -0500 Subject: [PATCH] refactor: Add MaybeNullWhen(false) attr to TryGetSingle ext fn --- .../spark_core/Collections/Extensions/EnumerableExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/spark_core/Collections/Extensions/EnumerableExtensions.cs b/src/client/spark_core/Collections/Extensions/EnumerableExtensions.cs index e8e910d69..438059bec 100644 --- a/src/client/spark_core/Collections/Extensions/EnumerableExtensions.cs +++ b/src/client/spark_core/Collections/Extensions/EnumerableExtensions.cs @@ -571,7 +571,7 @@ namespace System.Collections.Generic { return true; } - public static bool TryGetSingle(this IEnumerable source, out T? result) { + public static bool TryGetSingle(this IEnumerable source, [MaybeNullWhen(false)]out T result) { if (source == null) throw new ArgumentNullException(nameof(source)); using (var en = source.GetEnumerator()) { if (en.MoveNext()) {