MCPcopy Create free account
hub / github.com/csskit/csskit / is_empty

Method is_empty

crates/csskit_ast/src/when_rule.rs:39–46  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

37
38impl<'a> WhenCondition<'a> {
39 pub fn is_empty(&self) -> bool {
40 match self {
41 Self::Is(_) => false,
42 Self::Not(_, _) => false,
43 Self::And(xs) => xs.is_empty(),
44 Self::Or(xs) => xs.is_empty(),
45 }
46 }
47
48 /// Check if all features in this condition have valid threshold values.
49 pub fn is_valid(&self, source: &str) -> bool {

Callers 15

commit_overlaysMethod · 0.45
generateFunction · 0.45
generate_definitionMethod · 0.45
mainFunction · 0.45
to_spanMethod · 0.45
process_nested_rulesMethod · 0.45
newMethod · 0.45
process_ruleMethod · 0.45
collectMethod · 0.45
parseMethod · 0.45

Calls

no outgoing calls

Tested by 1

try_contentMethod · 0.36