forestrie 0.2.1

Quick string matches
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use forestrie::match_exact;

#[test]
fn simple() {
	let s = "red";
	let n = match_exact! { s,
		"blue" => 5,
		"red" | "green" => 12,
		c"orange" => 7,
		_ => 9,
	};
	assert_eq!(n, 12);
}