✨ iterated fn + defer + retry
This commit is contained in:
parent
c010cc13e8
commit
18c663fcdb
11 changed files with 678 additions and 65 deletions
12
examples/defer.rs
Normal file
12
examples/defer.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
use comrade::defer;
|
||||
|
||||
fn main() {
|
||||
println!("Hello World!");
|
||||
|
||||
defer!(|| {
|
||||
// this will run at the end of the scope
|
||||
println!("Bye World!");
|
||||
});
|
||||
|
||||
println!("doing something");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue