der_sort

Function der_sort 

Source
fn der_sort<T: DerOrd>(slice: &mut [T]) -> Result<()>
Expand description

Sort a mut slice according to its DerOrd, returning any errors which might occur during the comparison.

The algorithm is insertion sort, which should perform well when the input is mostly sorted to begin with.

This function is used rather than Rust’s built-in [T]::sort_by in order to support heapless no_std targets as well as to enable bubbling up sorting errors.