drop_code 1.0.1

A macro that allows you to implement code that will be automatically executed after the function code has finished, be it the end of the function or even a panic state.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use drop_code::drop_code;

#[allow(unreachable_code)]
fn main() {
	drop_code! {
		println!("7 line drop code logic"); // 3
	}

	println!("10 line, main code"); // 1
	panic!("10 line code"); // 2
	println!("12 line, end code");
}