From 4b5e21d0d9c95f38e9358a03dce0d83915d02b98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=98=93=E6=98=A5=E9=A3=8E?=
<77157236+night-cruise@users.noreply.github.com>
Date: Sun, 24 Sep 2023 16:16:06 +0800
Subject: [PATCH] refactor: update the hash_map_open_addressing rust codes to
synchronize with java (#787)
---
codes/rust/chapter_hashing/array_hash_map.rs | 3 +-
.../hash_map_open_addressing.rs | 168 +++++++++---------
2 files changed, 82 insertions(+), 89 deletions(-)
diff --git a/codes/rust/chapter_hashing/array_hash_map.rs b/codes/rust/chapter_hashing/array_hash_map.rs
index b77b5a68..3216509b 100644
--- a/codes/rust/chapter_hashing/array_hash_map.rs
+++ b/codes/rust/chapter_hashing/array_hash_map.rs
@@ -4,13 +4,12 @@
* Author: xBLACICEx (xBLACKICEx@outlook.com)
*/
-#[derive(Debug, Clone)]
/* 键值对 */
+#[derive(Debug, Clone, PartialEq)]
pub struct Pair {
pub key: i32,
pub val: String,
}
-
/* 基于数组简易实现的哈希表 */
pub struct ArrayHashMap {
buckets: Vec