diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 5f50fa7..6070e06 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,7 +15,12 @@ fn main() { match random_command { ("henchman", _) => { let class_name = random_tables.roll_table("henchman_class").to_string(); - let class_ref = CLASSES.get(&*class_name).unwrap_or_else(|| { + // HACK: Need a proper way to do lookups, shouldn't rely on + // downcasing the class name. This whole situation is really + // indicative of the need for an architectural improvement. + // Need to think about roll_table()'s return type, + // and how we want to get table results in general. + let class_ref = CLASSES.get(&*class_name.to_lowercase()).unwrap_or_else(|| { eprintln!("Class '{}' not found.", &*class_name); std::process::exit(1); }); |