Skip to content

Commit

Permalink
Improve/simplify Optional OrDefault() impl.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreise committed Jan 11, 2025
1 parent ff98747 commit 935ad33
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ partial struct Optional<T>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private T? InnerOrDefault()
=>
hasValue ? value : default;
value;
}

0 comments on commit 935ad33

Please sign in to comment.