Skip to content

Commit

Permalink
meh
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiasnordqvist committed Sep 17, 2024
1 parent 0827c36 commit 55db394
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions Results/DotNetThoughts.Results/Result.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,6 @@ public readonly record struct Result<T>
[Pure]
public static implicit operator Result<Unit>(Result<T> result) => result.ToUnitResult();

/// <summary>
/// This implicit operator takes a Result of type T and returns a Result of type Unit by throwing away the value, preserving only success or failure, along with errors.
/// This UnitResult is then wrapped in a completed Task.
/// It is the same as calling Task.FromResult(result.ToUnitResult()).
/// </summary>
/// <param name="result"></param>
[Pure]
public static implicit operator Task<Result<Unit>>(Result<T> result) => Task.FromResult(result.ToUnitResult());

/// <summary>
/// Creates a successful Result of type T.
/// </summary>
Expand Down

0 comments on commit 55db394

Please sign in to comment.