inline_tweak 1.2.4

Tweak values directly from the source code
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use inline_tweak::tweak;
use std::time::Duration;

fn counter() -> i32 {
    static mut N: i32 = 0;
    unsafe {
        N += 1;
        N
    }
}

fn main() {
    loop {
        // Try removing or changing the value while the application is running
        println!("{}", tweak!(200; counter()));
        std::thread::sleep(Duration::from_millis(1000));
    }
}