1、前言 数据排序经常会使用到,很多语言都自带排序方法,Rust也不例外。这里详细介绍Rust数组排序的方法。 2、vector整数排序 这里通过 vec::sort 对一个整数 Vector 进行排序 fn main() { let mut vec = vec![1, 34, 10, 2