aboutsummaryrefslogtreecommitdiff
path: root/planetwars-server/src/modules/matches.rs
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-07-05 20:34:20 +0200
committerIlion Beyst <ilion.beyst@gmail.com>2022-07-05 20:34:20 +0200
commitb3df5c6f8cc59e099a2f1db3df8089af4abca02e (patch)
tree8b717834ab72165610b1548bb080a3299d936936 /planetwars-server/src/modules/matches.rs
parent8a47b948eb88f1e0ff649880a70f9416306bac92 (diff)
downloadplanetwars.dev-b3df5c6f8cc59e099a2f1db3df8089af4abca02e.tar.xz
planetwars.dev-b3df5c6f8cc59e099a2f1db3df8089af4abca02e.zip
migrate code_bundles to bot_versions
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
}