feat: return an error if unknown enabled/disabled feature (#5817)

This commit is contained in:
jif-oai
2025-10-27 16:53:00 +00:00
committed by GitHub
parent 5ee8a17b4e
commit 775fbba6e0
2 changed files with 53 additions and 9 deletions

View File

@@ -191,6 +191,11 @@ fn feature_for_key(key: &str) -> Option<Feature> {
legacy::feature_for_key(key)
}
/// Returns `true` if the provided string matches a known feature toggle key.
pub fn is_known_feature_key(key: &str) -> bool {
feature_for_key(key).is_some()
}
/// Deserializable features table for TOML.
#[derive(Deserialize, Debug, Clone, Default, PartialEq)]
pub struct FeaturesToml {