You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
because it expects Option<fn(int) -> int> and gets Option<fn(int) -> int {test_int}>
This is an issue for FFI specifically because Option<fn(...) -> ...> is the idiomatic way (mentioned in the FFI guide) to represent C function pointers as it takes advantage of nullable pointer optimization.
I'll add that for anyone encountering this issue, an explicit cast fixes it: