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

Function unwrap_to_options

crates/csskit_proc_macro/src/generate.rs:340–346  ·  view source on GitHub ↗
(def: &Def)

Source from the content-addressed store, hash-verified

338 }
339 }
340 fn unwrap_to_options(def: &Def) -> Option<&Def> {
341 match def {
342 Def::Group(inner, _) => unwrap_to_options(inner),
343 d if is_options_with_keywords(d) => Some(d),
344 _ => None,
345 }
346 }
347 match def {
348 Def::Combinator(children, DefCombinatorStyle::Alternatives) => {
349 children.iter().filter_map(unwrap_to_options).collect()

Callers 1

Calls 1

is_options_with_keywordsFunction · 0.85

Tested by

no test coverage detected