mirror of
https://github.com/girlbossceo/ruwuma.git
synced 2025-04-29 06:49:48 -04:00
common: Allow to configure exhaustive types when environment variable is set
Allow to configure exhaustive types via the `RUMA_UNSTABLE_EXHAUSTIVE_TYPES` environment variable in the same way as it's done in other crates. ruma-common contains at least `NewPushRule` which may be configured as exhaustive. `ruma-client-api` uses the mentioned type and, when the environment variable is set, it fails to compile the project.
This commit is contained in:
parent
f5ab6302aa
commit
cd133c2c15
2 changed files with 8 additions and 0 deletions
|
@ -26,6 +26,7 @@ Bug fixes:
|
|||
|
||||
- `MatrixVersion::V1_0` now also matches Identity Service API versions r0.2.0 to
|
||||
r0.3.0.
|
||||
- Allow configure exhaustive types via `RUMA_UNSTABLE_EXHAUSTIVE_TYPES` environment variable
|
||||
|
||||
Improvements:
|
||||
|
||||
|
|
|
@ -7,4 +7,11 @@ fn main() {
|
|||
}
|
||||
|
||||
println!("cargo:rerun-if-env-changed=RUMA_IDENTIFIERS_STORAGE");
|
||||
|
||||
// Set the `ruma_unstable_exhaustive_types` configuration from an environment variable.
|
||||
if env::var("RUMA_UNSTABLE_EXHAUSTIVE_TYPES").is_ok() {
|
||||
println!("cargo:rustc-cfg=ruma_unstable_exhaustive_types");
|
||||
}
|
||||
|
||||
println!("cargo:rerun-if-env-changed=RUMA_UNSTABLE_EXHAUSTIVE_TYPES");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue