asyncio: fix unreasonable return type of promise.Next()

This commit is contained in:
Li Jie
2024-08-05 15:21:14 +08:00
parent 3bf0780a67
commit 98072f3f4b
3 changed files with 103 additions and 68 deletions

View File

@@ -21,7 +21,9 @@ func UseGenInts() int {
co := WrapGenInts()
r := 0
for !co.Done() {
r += co.Next()
v := co.Value()
r += v
co.Next()
}
return r
}