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

Method unique_isa

cranelift/reader/src/isaspec.rs:27–34  ·  view source on GitHub ↗

If the `IsaSpec` contains exactly 1 `TargetIsa` we return a reference to it

(&self)

Source from the content-addressed store, hash-verified

25impl IsaSpec {
26 /// If the `IsaSpec` contains exactly 1 `TargetIsa` we return a reference to it
27 pub fn unique_isa(&self) -> Option<&dyn TargetIsa> {
28 if let Self::Some(ref isa_vec) = *self {
29 if isa_vec.len() == 1 {
30 return Some(&*isa_vec[0]);
31 }
32 }
33 None
34 }
35}
36
37/// An error type returned by `parse_options`.

Callers 4

test_tuplesFunction · 0.80
runFunction · 0.80
run_testFunction · 0.80
handle_moduleFunction · 0.80

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected