From 935ad337fb44d2e4e272508ebac2221e6d1fb209 Mon Sep 17 00:00:00 2001 From: Andrei Sergeev Date: Sat, 11 Jan 2025 20:24:35 +0400 Subject: [PATCH] Improve/simplify Optional OrDefault() impl. --- .../Optional/Optional.T/Inner/Optional.T.InnerOrDefault.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core-taggeds-optional/Optional/Optional.T/Inner/Optional.T.InnerOrDefault.cs b/src/core-taggeds-optional/Optional/Optional.T/Inner/Optional.T.InnerOrDefault.cs index 276202bc..46dbd4f4 100644 --- a/src/core-taggeds-optional/Optional/Optional.T/Inner/Optional.T.InnerOrDefault.cs +++ b/src/core-taggeds-optional/Optional/Optional.T/Inner/Optional.T.InnerOrDefault.cs @@ -7,5 +7,5 @@ partial struct Optional [MethodImpl(MethodImplOptions.AggressiveInlining)] private T? InnerOrDefault() => - hasValue ? value : default; + value; }