From 68f527ec9996428c72f2559bfdbaf9ec7910454d Mon Sep 17 00:00:00 2001 From: Kyle Ratti Date: Tue, 30 Apr 2024 13:17:02 -0400 Subject: [PATCH] BREAKING CHANGE: feat: use record struct --- Base/Structures/Maybe.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Base/Structures/Maybe.cs b/Base/Structures/Maybe.cs index 39b2eca..7fff1b0 100644 --- a/Base/Structures/Maybe.cs +++ b/Base/Structures/Maybe.cs @@ -9,12 +9,12 @@ public static class Maybe public static Maybe Empty() => new(val: default!, hasValue: false); } -public readonly struct Maybe +public readonly record struct Maybe { private readonly T _value; public readonly bool HasValue; - internal Maybe(T val = default!, bool hasValue = true) + internal Maybe(T val, bool hasValue) { _value = val; HasValue = hasValue;