Skip to content

Releases: Uriopass/inline_tweak

inline_tweak 1.1.0 - Introducing #[tweak_fn] proc-macro

30 Jan 14:39
Compare
Choose a tag to compare

inline_tweak can now be applied to an entire function body using the #[tweak_fn] proc macro.
It turns every literal into a tweakable value.

To allow this, inline_tweak was refactored to be much more optimized in how it reads files/file updates. Tweak reads are now almost always one hashmap lookup and files are read only once per update.

#[inline_tweak::tweak_fn]
fn main() {
    loop {
        let v = 1.0 + 5.0; // update any literal while the program is running!
        let name = "John
                     Doe"; // Multi line strings also work!
        println!("{}: {}", name, v);
    }
}