MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / number

Function number

06_pattern_matching/rust/pattern_matching.rs:21–28  ·  view source on GitHub ↗
(x: i32)

Source from the content-addressed store, hash-verified

19}
20
21fn number(x: i32) {
22 match x {
23 1 => println!("one"),
24 2 | 3 => println!("two or three"),
25 4..=i32::MAX => println!("four or bigger"),
26 _ => println!("anything"),
27 }
28}
29
30fn main() {
31 for x in 0..6 { number(x) }

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected