Introsort implementation in Rust