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

Method generate_opt

crates/test-util/src/component_fuzz.rs:237–247  ·  view source on GitHub ↗
(
        u: &mut Unstructured<'_>,
        depth: u32,
        fuel: &mut u32,
    )

Source from the content-addressed store, hash-verified

235 }
236
237 fn generate_opt(
238 u: &mut Unstructured<'_>,
239 depth: u32,
240 fuel: &mut u32,
241 ) -> arbitrary::Result<Option<Type>> {
242 Ok(if u.arbitrary()? {
243 Some(Type::generate(u, depth, fuel)?)
244 } else {
245 None
246 })
247 }
248
249 fn generate_list<const L: u32, const H: u32>(
250 u: &mut Unstructured<'_>,

Callers

nothing calls this directly

Calls 3

OkFunction · 0.85
generateFunction · 0.50
arbitraryMethod · 0.45

Tested by

no test coverage detected