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

Method new

cranelift/reader/src/testcommand.rs:38–48  ·  view source on GitHub ↗

Create a new TestCommand by parsing `s`. The returned command contains references into `s`.

(s: &'a str)

Source from the content-addressed store, hash-verified

36 /// Create a new TestCommand by parsing `s`.
37 /// The returned command contains references into `s`.
38 pub fn new(s: &'a str) -> Self {
39 let mut parts = s.split_whitespace();
40 let cmd = parts.next().unwrap_or("");
41 Self {
42 command: cmd,
43 options: parts
44 .filter(|s| !s.is_empty())
45 .map(TestOption::new)
46 .collect(),
47 }
48 }
49}
50
51impl<'a> Display for TestCommand<'a> {

Callers

nothing calls this directly

Calls 7

collectMethod · 0.80
FlagClass · 0.50
ValueClass · 0.50
nextMethod · 0.45
mapMethod · 0.45
is_emptyMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected