nandi/rustnimpublic Fork 0
99b837678a29fedd20bb68a5117a6621d8d178b4
Commits
Clone
git clone https://git.rickub.com/nandi/rustnim.git
git clone ssh://git@rickub.com/nandi/rustnim.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

012-match.rs · 16 lines · 243 BRust Blame HistoryRaw
Add the differential test runner, and a lowering to measure with it 8ac32af nandithebull 15h ago1fn name(n: u8) -> i32 {
2 match n {
3 0 => 100,
4 1 | 2 => 200,
5 3..=5 => 300,
6 _ => 400,
7 }
8}
9
10fn main() {
11 let mut i: u8 = 0;
12 while i < 8 {
13 println!("{} {}", i, name(i));
14 i += 1;
15 }
16}