mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-24 12:06:07 +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:
@@ -4,7 +4,6 @@
|
||||
* Author: night-cruise (2586447362@qq.com)
|
||||
*/
|
||||
|
||||
|
||||
/* 加法哈希 */
|
||||
fn add_hash(key: &str) -> i32 {
|
||||
let mut hash = 0_i64;
|
||||
@@ -15,7 +14,7 @@ fn add_hash(key: &str) -> i32 {
|
||||
}
|
||||
|
||||
hash as i32
|
||||
}
|
||||
}
|
||||
|
||||
/* 乘法哈希 */
|
||||
fn mul_hash(key: &str) -> i32 {
|
||||
@@ -68,4 +67,4 @@ fn main() {
|
||||
|
||||
let hash = rot_hash(key);
|
||||
println!("旋转哈希值为 {hash}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user