diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-05 20:34:20 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-05 20:34:20 +0200 |
commit | b3df5c6f8cc59e099a2f1db3df8089af4abca02e (patch) | |
tree | 8b717834ab72165610b1548bb080a3299d936936 /planetwars-server/src/modules/matches.rs | |
parent | 8a47b948eb88f1e0ff649880a70f9416306bac92 (diff) | |
download | planetwars.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.rs | 5 |
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 } |