From d61c3f1f6fd16a50cc1955f6f059c4516e51a1ec Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 9 Aug 2022 17:35:49 -0700 Subject: [PATCH] Fix change detection bug in build script --- build/main.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/build/main.rs b/build/main.rs index 180b87c..0d66643 100644 --- a/build/main.rs +++ b/build/main.rs @@ -10,16 +10,14 @@ mod entity; mod entity_event; pub fn main() -> anyhow::Result<()> { + println!("cargo:rerun-if-changed=extracted/"); + let generators = [ (entity::build as fn() -> _, "entity.rs"), (entity_event::build, "entity_event.rs"), (block::build, "block.rs"), ]; - for (_, file_name) in generators { - println!("cargo:rerun-if-changed=extracted/{file_name}"); - } - let out_dir = env::var_os("OUT_DIR").context("can't get OUT_DIR env var")?; for (g, file_name) in generators {