We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f61465 commit 702cef5Copy full SHA for 702cef5
1 file changed
tools/slp_viewer/src/main.rs
@@ -24,6 +24,8 @@ extern crate open_aoe_slp as slp;
24
extern crate open_aoe_palette as palette;
25
26
extern crate minifb;
27
+
28
+#[macro_use(value_t)]
29
extern crate clap;
30
31
use clap::{App, Arg};
@@ -113,7 +115,7 @@ fn main() {
113
115
.index(1))
114
116
.get_matches();
117
- let slp_id = matches.value_of("SLP").unwrap().parse::<u32>().expect("valid SLP ID");
118
+ let slp_id = value_t!(matches, "SLP", u32).expect("valid SLP ID");
119
let drs_name = matches.value_of("DRS").unwrap_or("game/data/graphics.drs");
120
let interfac_name = matches.value_of("INTERFAC").unwrap_or("game/data/interfac.drs");
121
let mut player_index = matches.value_of("PLAYER")
0 commit comments