rust: Replace proc with unboxed closures