17 lines
419 B
Rust
17 lines
419 B
Rust
use eyes::*;
|
|
|
|
fn main() {
|
|
let input = "turn off 660,55 through 986,197";
|
|
let template = "{} {},{} through {},{}";
|
|
|
|
println!("input: '{}'", input);
|
|
println!("pattern: '{}'", template);
|
|
|
|
let (op, x1, y1, x2, y2) =
|
|
try_parse!(input, template, String, usize, usize, usize, usize).unwrap();
|
|
|
|
println!("op: {:?}", op);
|
|
println!("p1: {:?}", (x1, y1));
|
|
println!("p2: {:?}", (x2, y2));
|
|
}
|