Skip to content

Commit

Permalink
Offer example
Browse files Browse the repository at this point in the history
  • Loading branch information
workingjubilee committed Apr 6, 2021
1 parent abcacb2 commit 51fab18
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,12 @@ println!("{}", match ph {
_ => unreachable!(),
});

# let uint: u32 = 5;
match uint {
0 => "zero!",
1.. => "positive number!",
};

// using paths to constants:
# const TROPOSPHERE_MIN : u8 = 6;
# const TROPOSPHERE_MAX : u8 = 20;
Expand Down

0 comments on commit 51fab18

Please sign in to comment.