MCPcopy Create free account
hub / github.com/IntegralPilot/rustc_codegen_jvm / run_processor

Function run_processor

tests/binary/fn_pointers/src/main.rs:48–58  ·  view source on GitHub ↗
(proc: Processor<T>, input: T, use_fallback: bool)

Source from the content-addressed store, hash-verified

46}
47
48fn run_processor<T: Copy>(proc: Processor<T>, input: T, use_fallback: bool) -> T {
49 if use_fallback {
50 (proc.fallback)(input)
51 } else {
52 match proc.step {
53 ComputeStep::Unary(f) => f(input),
54 ComputeStep::Binary(f, arg) => f(input, arg),
55 ComputeStep::Constant(val) => val,
56 }
57 }
58}
59
60fn apply_pair_pipeline<T>(pair: Pair<fn(T) -> T, fn(T) -> T>, val: T) -> T {
61 let intermediate = (pair.first)(val);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected