Whether fact injection is enabled: the `TRACEDECAY_MEMORY_INJECTION` env var wins when set, otherwise the user-config flag (default on).
()
| 60 | /// Whether fact injection is enabled: the `TRACEDECAY_MEMORY_INJECTION` env |
| 61 | /// var wins when set, otherwise the user-config flag (default on). |
| 62 | pub fn memory_injection_enabled() -> bool { |
| 63 | injection_enabled_from( |
| 64 | crate::config::brand_env("MEMORY_INJECTION").as_deref(), |
| 65 | crate::user_config::UserConfig::load().memory_injection_enabled, |
| 66 | ) |
| 67 | } |
| 68 | |
| 69 | /// Pure form of the gate for tests: env override beats the config flag. |
| 70 | pub fn injection_enabled_from(env_value: Option<&str>, config_flag: bool) -> bool { |
no test coverage detected