mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-23 18:11:45 +08:00
Finetune Rust code.
This commit is contained in:
@@ -12,7 +12,9 @@ pub struct Pair {
|
||||
}
|
||||
|
||||
/* 基于数组简易实现的哈希表 */
|
||||
pub struct ArrayHashMap { buckets: Vec<Option<Pair>> }
|
||||
pub struct ArrayHashMap {
|
||||
buckets: Vec<Option<Pair>>
|
||||
}
|
||||
|
||||
impl ArrayHashMap {
|
||||
pub fn new() -> ArrayHashMap {
|
||||
@@ -109,4 +111,4 @@ fn main() {
|
||||
for val in map.value_set() {
|
||||
println!("{}", val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user