Skip to content

Commit

Permalink
chore(destructors): add clarification to code (#416)
Browse files Browse the repository at this point in the history
Co-authored-by: Marco Ieni <[email protected]>
  • Loading branch information
AndreiTsN and MarcoIeni authored Sep 1, 2024
1 parent d4849cd commit f716b89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/idioms/dtor-finally.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ be used to run code that must be run before exit.
## Example

```rust,ignore
fn baz() -> Result<(), ()> {
// some code
}
fn bar() -> Result<(), ()> {
// These don't need to be defined inside the function.
struct Foo;
Expand Down

0 comments on commit f716b89

Please sign in to comment.