Some code is just copied paste from here and there. There is one code insertion.rs which demonstrates how to write insertion sort in Rust in a generic manner without assuming too much on the generic type T.