diff --git a/crates/infra_utils/src/command.rs b/crates/infra_utils/src/command.rs index 3d4e955030..6c78393a8e 100644 --- a/crates/infra_utils/src/command.rs +++ b/crates/infra_utils/src/command.rs @@ -25,5 +25,7 @@ pub fn create_shell_command(command_name: &str) -> Command { env::vars().filter(|(key, _)| key.starts_with("CARGO_")).for_each(|(key, _)| { command.env_remove(key); }); + // Filter out (the potentially set) OUT_DIR environment variable. + command.env_remove("OUT_DIR"); command } diff --git a/crates/infra_utils/src/tracing_test.rs b/crates/infra_utils/src/tracing_test.rs index 71b5933c24..422a2da5c0 100644 --- a/crates/infra_utils/src/tracing_test.rs +++ b/crates/infra_utils/src/tracing_test.rs @@ -99,7 +99,7 @@ struct MessageVisitor<'a> { message: &'a mut String, } -impl<'a> Visit for MessageVisitor<'a> { +impl Visit for MessageVisitor<'_> { fn record_debug(&mut self, field: &Field, value: &dyn Debug) { if field.name() == "message" { self.message.push_str(&format!("{:?}", value)); diff --git a/crates/starknet_gateway/build.rs b/crates/starknet_gateway/build.rs deleted file mode 100644 index 74fc7c9940..0000000000 --- a/crates/starknet_gateway/build.rs +++ /dev/null @@ -1,3 +0,0 @@ -// Sets up the environment variable OUT_DIR, which holds the cairo compiler binary. -// The binary is downloaded to OUT_DIR by the starknet_sierra_compile crate. -fn main() {} diff --git a/crates/starknet_integration_tests/build.rs b/crates/starknet_integration_tests/build.rs deleted file mode 100644 index 74fc7c9940..0000000000 --- a/crates/starknet_integration_tests/build.rs +++ /dev/null @@ -1,3 +0,0 @@ -// Sets up the environment variable OUT_DIR, which holds the cairo compiler binary. -// The binary is downloaded to OUT_DIR by the starknet_sierra_compile crate. -fn main() {} diff --git a/crates/starknet_sequencer_node/build.rs b/crates/starknet_sequencer_node/build.rs deleted file mode 100644 index 74fc7c9940..0000000000 --- a/crates/starknet_sequencer_node/build.rs +++ /dev/null @@ -1,3 +0,0 @@ -// Sets up the environment variable OUT_DIR, which holds the cairo compiler binary. -// The binary is downloaded to OUT_DIR by the starknet_sierra_compile crate. -fn main() {} diff --git a/crates/starknet_sierra_compile/src/paths.rs b/crates/starknet_sierra_compile/src/paths.rs index 5cb4624185..7d1963b3d0 100644 --- a/crates/starknet_sierra_compile/src/paths.rs +++ b/crates/starknet_sierra_compile/src/paths.rs @@ -1,6 +1,6 @@ -// Note: This module includes constants that are needed during build and run times. It must -// not contain functionality that is available in only in one of these modes. Specifically, it -// must avoid relying on env variables such as 'CARGO_*' or 'OUT_DIR'. +// Note: This module includes path resolution functions that are needed during build and run times. +// It must not contain functionality that is available in only in one of these modes. Specifically, +// it must avoid relying on env variables such as 'CARGO_*' or 'OUT_DIR'. fn target_dir(out_dir: std::path::PathBuf) -> std::path::PathBuf { out_dir