MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / assert_all_rules_used

Method assert_all_rules_used

crates/wit-bindgen/src/config.rs:151–162  ·  view source on GitHub ↗
(&self, kind: &str)

Source from the content-addressed store, hash-verified

149 }
150
151 pub(crate) fn assert_all_rules_used(&self, kind: &str) -> Result<()> {
152 let mut unused = Vec::new();
153 for rule in self.rules.iter().filter(|r| !r.used) {
154 unused.push(format!("{:?}: {:?}", rule.filter, rule.flags));
155 }
156
157 if unused.is_empty() {
158 return Ok(());
159 }
160
161 anyhow::bail!("unused `{kind}` rules found: {unused:?}");
162 }
163}

Callers 1

finishMethod · 0.80

Calls 5

OkFunction · 0.85
newFunction · 0.50
iterMethod · 0.45
pushMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected