Check if all features in this condition have valid threshold values.
(&self, source: &str)
| 47 | |
| 48 | /// Check if all features in this condition have valid threshold values. |
| 49 | pub fn is_valid(&self, source: &str) -> bool { |
| 50 | match self { |
| 51 | Self::Is(feature) => feature.is_valid(source), |
| 52 | Self::Not(_, feature) => feature.is_valid(source), |
| 53 | Self::And(features) => features.iter().all(|(f, _)| f.is_valid(source)), |
| 54 | Self::Or(features) => features.iter().all(|(f, _)| f.is_valid(source)), |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | impl<'a> FeatureConditionList<'a> for WhenCondition<'a> { |
no test coverage detected