Skip to content

Commit

Permalink
📝 fix yield_from_gen
Browse files Browse the repository at this point in the history
  • Loading branch information
Xudong-Huang committed Feb 27, 2024
1 parent f95f1d3 commit 0d78c2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ fn yield_from_gen() {
go!(scope, || {
let g = Gn::<()>::new_scoped(|mut scope| {
while a < 10 {
scope.yield_(a);
unsafe { scope.yield_unsafe(a) };
// this is yield from the generator context!
yield_now();
a += 1;
Expand Down

0 comments on commit 0d78c2b

Please sign in to comment.