希望这能有所帮助。fn find_smallest_int(arr: &[i32]) -> i32 { let mut small_number=arr.to_vec(); small_number.sort(); small_number[0] }