2 releases (1 stable)

1.0.0 Dec 1, 2023
0.2.0 Nov 20, 2021
0.1.1 Dec 1, 2023
0.1.0 Nov 19, 2021

#245 in Procedural macros

Download history 5/week @ 2024-02-22 4/week @ 2024-02-29 2/week @ 2024-03-28 88/week @ 2024-04-04 7/week @ 2024-04-11

97 downloads per month

Unlicense

3KB

Templest

A single procedural macro to make temporary variables easier. Code example:

use templest::temp;

fn main() {
    let temp!() = 10;
    
    println!("{:?}", temp!(-));
}

This code example prints 10 to the console. If we add a new temporary variable, after we define the first one as 10, and define that as 20, than 20 will be printed.

use templest::temp;

fn main() {
    let temp!() = 10;
    let temp!() = 20;
    
    println!("{:?}", temp!(-));
}

This new code example will print 20 to the console.

No runtime deps