Build 0.18.4.0

This commit is contained in:
Markus Isberg
2022-05-31 23:13:05 +09:00
parent 077917fa5d
commit 64db1a6a44
175 changed files with 4916 additions and 2393 deletions
@@ -15,6 +15,21 @@ namespace Barotrauma
public bool IsNone() => this is None<T>;
public bool IsSome() => this is Some<T>;
public bool TryUnwrap(out T outValue)
{
switch (this)
{
case Some<T> { Value: var value }:
outValue = value;
return true;
case None<T> _:
outValue = default;
return false;
default:
throw new ArgumentOutOfRangeException();
}
}
public Option<TType> Select<TType>(Func<T, TType> selector) =>
this switch
{