Re:Neat Rust Tricks: Passing Closures to C
by imstuff on Wednesday November 27, 2019 @02:09AM
(#21645912)
Your `fn rust_qsort` takes ownership of the vector, so it frees its memory after sorting and it can't be used after sorting in the caller function.
And generic `impl FnMut` won't work in `extern "C"`, it only accepts function pointers.
[ Parent
| on HN ]
There are no comments on this comment yet.