Skip to content

Commit b1e4066

Browse files
committed
Add two missing returns in the desugarings
Thanks Nokel81 for spotting this.
1 parent 50244ad commit b1e4066

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

text/0000-try-trait-v2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ The previous desugaring of `x?` was
322322
```rust
323323
match Try::into_result(x) {
324324
Ok(v) => v,
325-
Err(e) => Try::from_error(From::from(e)),
325+
Err(e) => return Try::from_error(From::from(e)),
326326
}
327327
```
328328

@@ -331,7 +331,7 @@ The new one is very similar:
331331
```rust
332332
match Bubble::branch(x) {
333333
ControlFlow::Continue(v) => v,
334-
ControlFlow::Break(h) => Try::from_holder(h),
334+
ControlFlow::Break(h) => return Try::from_holder(h),
335335
}
336336
```
337337

0 commit comments

Comments
 (0)