It seems it's only for Azure: https://docs.microsoft.com/en-us/visualstudio/debugger/debug...
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…
ok extern "C" { #![allow(improper_ctypes)] fn qsort( ptr: *mut (), count: usize, size: usize, comp: extern "C" fn (*const (), *const ()) -> i32, ); fn qsort_r( ptr: *mut (), count: usize, size: usize, comp: extern "C"…
It seems it's only for Azure: https://docs.microsoft.com/en-us/visualstudio/debugger/debug...
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…
ok extern "C" { #![allow(improper_ctypes)] fn qsort( ptr: *mut (), count: usize, size: usize, comp: extern "C" fn (*const (), *const ()) -> i32, ); fn qsort_r( ptr: *mut (), count: usize, size: usize, comp: extern "C"…