final_fn

Crates.iofinal_fn
lib.rsfinal_fn
version0.1.0
sourcesrc
created_at2023-03-04 16:00:16.565398
updated_at2023-03-04 16:00:16.565398
descriptionSimple final_fn macro, what executes given code when leaving code block
homepage
repository
max_upload_size
id800706
size11,973
Blinc (Blinc13)

documentation

README

final-fn

This crate provides final_fn macro, what executes given code when leaving code block.

Examples

use final_fn::final_fn;

fn main() {
    final_fn!(
        println!("End of main!")
    );
    
    println!("Hello world!");
}

You can also pass variables

use final_fn::final_fn;

fn main() {
    let x = 56;
    
    final_fn(
        println!("{x}")
    );
    
    println!("Hello world");
}
Commit count: 0

cargo fmt