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

Function cat_one

cranelift/src/cat.rs:30–43  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

28}
29
30fn cat_one(path: &Path) -> Result<()> {
31 let buffer = read_to_string(path)?;
32 let items =
33 parse_functions(&buffer).with_context(|| format!("failed to parse {}", path.display()))?;
34
35 for (idx, func) in items.into_iter().enumerate() {
36 if idx != 0 {
37 println!();
38 }
39 print!("{func}");
40 }
41
42 Ok(())
43}

Callers 1

runFunction · 0.85

Calls 5

read_to_stringFunction · 0.85
parse_functionsFunction · 0.85
OkFunction · 0.85
with_contextMethod · 0.80
into_iterMethod · 0.45

Tested by

no test coverage detected