mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
433da1fc04
They pass fine.
18 lines
369 B
Rust
18 lines
369 B
Rust
extern crate interesting;
|
|
|
|
fn main() {
|
|
let arg = std::env::args().skip(1).next().unwrap();
|
|
|
|
for c in arg.chars() {
|
|
if c == '2' {
|
|
interesting::function_called_twice(c);
|
|
} else {
|
|
interesting::function_called_42_times(c);
|
|
}
|
|
|
|
if c == '0' {
|
|
interesting::function_called_never(c);
|
|
}
|
|
}
|
|
}
|