Skip to content

Commit 5caf721

Browse files
authored
Merge pull request #7 from jhett12321/patch-1
Remove class constraint from AsIEnumerator.
2 parents 9f77669 + 64eb807 commit 5caf721

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

UnityProject/Assets/Plugins/AsyncAwaitUtil/Source/TaskExtensions.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ public static IEnumerator AsIEnumerator(this Task task)
2323
}
2424

2525
public static IEnumerator<T> AsIEnumerator<T>(this Task<T> task)
26-
where T : class
2726
{
2827
while (!task.IsCompleted)
2928
{
30-
yield return null;
29+
yield return default(T);
3130
}
3231

3332
if (task.IsFaulted)

0 commit comments

Comments
 (0)