diff --git a/proto/generate.ers b/proto/generate.ers index 32fde29..498d619 100644 --- a/proto/generate.ers +++ b/proto/generate.ers @@ -46,10 +46,11 @@ fn main() { .collect::, io::Error>>() .unwrap(); // Get proto filenames without `.proto` extension - let input_filenames = input_files + let mut input_filenames = input_files .iter() .map(|file| file.file_stem().unwrap().to_str().unwrap()) .collect::>(); + input_filenames.sort(); println!("Proto files that will be generated: {:#?}", input_filenames); // Ask not to generate `mod.rs` file, we will do it ourselves @@ -90,6 +91,7 @@ fn main() { // Concatenate all this shit let mut mod_file = String::from("// This file is generated by `../proto/generate.ers`. Do not edit.\n\n"); + mod_file.push_str("#![allow(ambiguous_glob_reexports)]\n\n"); for line in module_lines { mod_file.push_str(line.as_str()); } @@ -98,7 +100,7 @@ fn main() { mod_file.push_str(line.as_str()); } // Write generated `mod.rs` file - output_dir.push("/mod.rs"); + output_dir.push("mod.rs"); fs::write(output_dir, mod_file).unwrap(); println!("✔ - Mod file generated"); } diff --git a/src/messages/mod.rs b/src/messages/mod.rs index 9ae6e79..6d959a4 100644 --- a/src/messages/mod.rs +++ b/src/messages/mod.rs @@ -1,5 +1,7 @@ // This file is generated by `../proto/generate.ers`. Do not edit. +#![allow(ambiguous_glob_reexports)] + mod cstrike15_gcmessages; mod cstrike15_usermessages; mod engine_gcmessages;