From f716b898a7429cfee3458d4baab2d3154ca93c36 Mon Sep 17 00:00:00 2001 From: AndreiTsN Date: Sun, 1 Sep 2024 13:02:36 +0200 Subject: [PATCH] chore(destructors): add clarification to code (#416) Co-authored-by: Marco Ieni <11428655+MarcoIeni@users.noreply.github.com> --- src/idioms/dtor-finally.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/idioms/dtor-finally.md b/src/idioms/dtor-finally.md index f0f82b26..e1b7f8db 100644 --- a/src/idioms/dtor-finally.md +++ b/src/idioms/dtor-finally.md @@ -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;