1 2 3 4 5 6 7 8 9 10 11
use crate::vm::round_vm::RoundVM; use std::str::FromStr; pub fn round<A: Clone + 'static + FromStr>( vm: &mut RoundVM, program: impl Fn(&mut RoundVM) -> A, ) -> A { let res = program(vm); vm.register_root(res); vm.export_data().root::<A>() }