Commit 9f6497c
authored
Fix enum representation of future
`g: MutexGuard<'_, u32>` does not exist in the scope of the "unresumed" generator / future, so this fixes it.
On top of that, I have taken the freedom to add a the `Return` variant to the enum, and have also added some comments on top of it, in order to have a precise recap' of the cited post about generators.1 parent 8713f96 commit 9f6497c
File tree
1 file changed
+19
-3
lines changed- posts/inside-rust
1 file changed
+19
-3
lines changedLines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
125 | | - | |
126 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
127 | 143 | | |
128 | 144 | | |
129 | 145 | | |
| |||
0 commit comments