Skip to content

Commit c28f5bb

Browse files
committed
Remove ValueTask wrapping
No need to wrap Task.Run in ValueTask for await.
1 parent f876cd5 commit c28f5bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CodeJam.Main/DisposableExtensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ public static async ValueTask DisposeAsync(this IDisposable disposable)
7171
Code.NotNull(disposable, nameof(disposable));
7272
if (disposable is IAsyncDisposable asyncDisposable)
7373
await asyncDisposable.DisposeAsync();
74-
await new ValueTask(Task.Run(() => disposable.Dispose()));
74+
await Task.Run(() => disposable.Dispose());
7575
}
7676
#endif
7777
}
78-
}
78+
}

0 commit comments

Comments
 (0)