aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/modules/matches.rs
diff options
context:
space:
mode:
Diffstat (limited to 'planetwars-server/src/modules/matches.rs')
-rw-r--r--planetwars-server/src/modules/matches.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/planetwars-server/src/modules/matches.rs b/planetwars-server/src/modules/matches.rs
index 6d9261d..7d6a1dc 100644
--- a/planetwars-server/src/modules/matches.rs
+++ b/planetwars-server/src/modules/matches.rs
@@ -98,7 +98,8 @@ impl RunMatch {
}
pub fn code_bundle_to_botspec(code_bundle: &db::bots::CodeBundle) -> Box<dyn BotSpec> {
- let bundle_path = PathBuf::from(BOTS_DIR).join(&code_bundle.path);
+ // TODO: get rid of this unwrap
+ let bundle_path = PathBuf::from(BOTS_DIR).join(code_bundle.code_bundle_path.as_ref().unwrap());
Box::new(DockerBotSpec {
code_path: bundle_path,
@@ -126,5 +127,5 @@ async fn run_match_task(
db::matches::save_match_result(match_id, result, &conn).expect("could not save match result");
- return outcome;
+ outcome
}