George-lewis / inbetween

A small macro for testing bounds

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

inbetween

A small macro that makes checking bounds look slightly nicer

Example

use inbetween::between;

let x = 33;

if between!(20 < x < 30) {
  println!("This prints!");
}

if between![0 < x > 10] {
  println!("This also prints!");
}

if between! { 99 > x >= 33 } {
  println!("...");
}

About

A small macro for testing bounds


Languages

Language:Rust 100.0%