From 83917ff81568a533697b49feaf43dae20fa79a92 Mon Sep 17 00:00:00 2001 From: Goren Barak Date: Thu, 30 Nov 2023 14:10:05 -0500 Subject: [PATCH] Added README.md --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..70b4078 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# Templest +A single procedural macro to make temporary variables easier. +Code example: +```rs +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. +```rs +use templest::temp; + +fn main() { + let temp!() = 10; + let temp!() = 20; + + println!("{:?}", temp!(-)); +} +``` +This new code example will print `20` to the console.