From dacc05a41b77bf2e86e27ac354db9b047c661a7d Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Tue, 28 Dec 2021 14:57:41 +0100 Subject: refactor workspace code --- planetwars-cli/src/lib.rs | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'planetwars-cli/src/lib.rs') diff --git a/planetwars-cli/src/lib.rs b/planetwars-cli/src/lib.rs index b71164f..e5566b0 100644 --- a/planetwars-cli/src/lib.rs +++ b/planetwars-cli/src/lib.rs @@ -1,23 +1,7 @@ -use serde::Deserialize; - mod commands; mod match_runner; mod web; - -use serde::Serialize; -use std::collections::HashMap; -use std::path::{Path, PathBuf}; - -#[derive(Serialize, Deserialize, Debug)] -struct WorkspaceConfig { - bots: HashMap, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct BotConfig { - path: String, - argv: Vec, -} +mod workspace; pub async fn run() { let res = commands::Cli::run().await; @@ -26,12 +10,3 @@ pub async fn run() { std::process::exit(1); } } - -fn resolve_bot_config(workspace_dir: &Path, config: BotConfig) -> BotConfig { - let mut path = PathBuf::from(workspace_dir); - path.push(&config.path); - BotConfig { - path: path.to_str().unwrap().to_string(), - argv: config.argv, - } -} -- cgit v1.2.3