mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-03 02:54:22 +00:00
cargo fmt rust code (#1131)
* cargo fmt code * Add empty line to seperate unrelated comments * Fix review * Update bubble_sort.rs * Update merge_sort.rs --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
@@ -79,7 +79,7 @@ fn main() {
|
||||
// 在 Rust 中,指定长度时([i32; 5])为数组
|
||||
// 由于 Rust 的数组被设计为在编译期确定长度,因此只能使用常量来指定长度
|
||||
// 为了方便实现扩容 extend() 方法,以下将(Vec) 看作数组(Array)也是rust一般情况下使用动态数组的类型
|
||||
let nums = vec![ 1, 3, 2, 5, 4 ];
|
||||
let nums = vec![1, 3, 2, 5, 4];
|
||||
print!("\n数组 nums = ");
|
||||
print_util::print_array(&nums);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user