Skip to content

Commit

Permalink
Remove unused hashbrown dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
gsserge committed Jul 4, 2024
1 parent 1930004 commit f9aeadc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 66 deletions.
55 changes: 0 additions & 55 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ description = "An immutable versioned adaptive radix trie."
repository = "https://github.com/surrealdb/vart"
homepage = "https://github.com/surrealdb/vart"
documentation = "https://docs.rs/vart/"
keywords = ["trie", "immutable-trie", "snapshot-isolation", "adaptive-radix-trie", "radix-trie"]
keywords = [
"trie",
"immutable-trie",
"snapshot-isolation",
"adaptive-radix-trie",
"radix-trie",
]

[dependencies]
hashbrown = "0.14.2"

[[bench]]
name = "vart_bench"
Expand Down
18 changes: 9 additions & 9 deletions src/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ where

#[cfg(test)]
mod tests {
use hashbrown::HashMap;
use std::collections::HashMap;

use crate::art::Tree;
use crate::{FixedSizeKey, Key};
Expand Down Expand Up @@ -477,7 +477,7 @@ mod tests {
}

// Verify that each key has the correct number of versions and they are sequential
for (_, versions) in &versions_map {
for versions in versions_map.values() {
assert_eq!(versions.len() as u64, versions_per_key);

let mut expected_version = 1;
Expand All @@ -491,8 +491,8 @@ mod tests {
let expected_count = num_keys as u64 * versions_per_key;
assert_eq!(
versions_map
.iter()
.map(|(_key, versions)| versions.len())
.values()
.map(|versions| versions.len())
.sum::<usize>(),
expected_count as usize,
"Total count of versions does not match the expected count"
Expand Down Expand Up @@ -531,7 +531,7 @@ mod tests {
}

// Verify that each key has the correct number of versions and they are in decreasing order
for (_, versions) in &versions_map {
for versions in versions_map.values() {
assert_eq!(
versions.len() as u64,
versions_per_key,
Expand All @@ -550,8 +550,8 @@ mod tests {
let expected_count = num_keys as u64 * versions_per_key;
assert_eq!(
versions_map
.iter()
.map(|(_key, versions)| versions.len())
.values()
.map(|versions| versions.len())
.sum::<usize>(),
expected_count as usize,
"Total count of versions does not match the expected count"
Expand Down Expand Up @@ -638,8 +638,8 @@ mod tests {
let expected_count = 25;
assert_eq!(
versions_map
.iter()
.map(|(_key, versions)| versions.len())
.values()
.map(|versions| versions.len())
.sum::<usize>(),
expected_count as usize,
"Total count of versions does not match the expected count"
Expand Down

0 comments on commit f9aeadc

Please sign in to comment.