Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
BarionLP committed Nov 14, 2024
1 parent e616801 commit 2123a89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Ametrin.Optional;

public static class TupleExtensions
public static class OptionTupleExtensions
{
public static Option<R> Select<R, T1, T2>(this (Option<T1>, Option<T2>) options, Func<T1, T2, R> selector)
=> options.Item1._hasValue && options.Item2._hasValue ? selector(options.Item1._value, options.Item2._value) : default(Option<R>);
Expand Down
2 changes: 1 addition & 1 deletion src/Operations/Or.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ partial struct Result<TValue, TError>
public static class OrExtensions
{
public static TValue? OrNull<TValue>(this Option<TValue> option) where TValue : class
=> option._hasValue ? option._value! : null;
=> option._hasValue ? option._value : null;

public static TValue? OrNull<TValue>(this Result<TValue> result) where TValue : class
=> result._hasValue ? result._value : null;
Expand Down

0 comments on commit 2123a89

Please sign in to comment.