From 7c1ecbf6da8d27c18277c3b4664a0041a7f3ef55 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 8 Jan 2024 22:15:32 -0800 Subject: [PATCH] move main to top --- src/main.rs | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main.rs b/src/main.rs index 231679e..ca96ef8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,6 +35,23 @@ struct MapList { maps: Vec, } +fn main() -> AResult<()> { + let cli = Cli::parse(); + match cli.command { + Commands::Download(map_list)=>download(map_list.maps), + Commands::DownloadTextures(pathlist)=>download_textures(pathlist.paths), + Commands::ConvertTextures=>convert_textures(), + Commands::DownloadMeshes(pathlist)=>download_meshes(pathlist.paths), + Commands::Extract(pathlist)=>extract(pathlist.paths), + Commands::WriteAttributes=>write_attributes(), + Commands::Interactive=>interactive(), + Commands::Replace=>replace(), + Commands::Scan=>scan(), + Commands::UnzipAll=>unzip_all(), + Commands::Upload=>upload(), + } +} + fn class_is_a(class: &str, superclass: &str) -> bool { if class==superclass { return true @@ -1021,20 +1038,3 @@ fn write_attributes() -> AResult<()>{ } Ok(()) } - -fn main() -> AResult<()> { - let cli = Cli::parse(); - match cli.command { - Commands::Download(map_list)=>download(map_list.maps), - Commands::DownloadTextures(pathlist)=>download_textures(pathlist.paths), - Commands::ConvertTextures=>convert_textures(), - Commands::DownloadMeshes(pathlist)=>download_meshes(pathlist.paths), - Commands::Extract(pathlist)=>extract(pathlist.paths), - Commands::WriteAttributes=>write_attributes(), - Commands::Interactive=>interactive(), - Commands::Replace=>replace(), - Commands::Scan=>scan(), - Commands::UnzipAll=>unzip_all(), - Commands::Upload=>upload(), - } -}