11
11
12
12
use std:: mem;
13
13
14
- use hashbrown:: raw:: RawTable ;
15
14
use hashbrown:: HashTable ;
16
15
17
16
use crate :: Allocative ;
@@ -20,28 +19,6 @@ use crate::Visitor;
20
19
21
20
const CAPACITY_NAME : Key = Key :: new ( "capacity" ) ;
22
21
23
- impl < T : Allocative > Allocative for RawTable < T > {
24
- fn visit < ' a , ' b : ' a > ( & self , visitor : & ' a mut Visitor < ' b > ) {
25
- use crate :: impls:: common:: DATA_NAME ;
26
- use crate :: impls:: hashbrown_util;
27
-
28
- let mut visitor = visitor. enter_self_sized :: < Self > ( ) ;
29
- {
30
- let mut visitor = visitor. enter_unique ( DATA_NAME , mem:: size_of :: < * const T > ( ) ) ;
31
- {
32
- let mut visitor = visitor. enter (
33
- CAPACITY_NAME ,
34
- hashbrown_util:: raw_table_alloc_size_for_len :: < T > ( self . capacity ( ) ) ,
35
- ) ;
36
- unsafe { visitor. visit_iter ( self . iter ( ) . map ( |e| e. as_ref ( ) ) ) } ;
37
- visitor. exit ( ) ;
38
- }
39
- visitor. exit ( ) ;
40
- }
41
- visitor. exit ( ) ;
42
- }
43
- }
44
-
45
22
impl < T : Allocative > Allocative for HashTable < T > {
46
23
fn visit < ' a , ' b : ' a > ( & self , visitor : & ' a mut Visitor < ' b > ) {
47
24
use crate :: impls:: common:: DATA_NAME ;
@@ -70,7 +47,6 @@ mod tests {
70
47
use std:: hash:: Hash ;
71
48
use std:: hash:: Hasher ;
72
49
73
- use hashbrown:: raw:: RawTable ;
74
50
use hashbrown:: HashTable ;
75
51
76
52
use crate :: golden:: golden_test;
@@ -81,16 +57,6 @@ mod tests {
81
57
hasher. finish ( )
82
58
}
83
59
84
- #[ test]
85
- fn test_raw_table ( ) {
86
- let mut table = RawTable :: with_capacity ( 100 ) ;
87
- for i in 0 ..100 {
88
- table. insert ( hash ( & i. to_string ( ) ) , i. to_string ( ) , hash) ;
89
- }
90
-
91
- golden_test ! ( & table) ;
92
- }
93
-
94
60
#[ test]
95
61
fn test_hash_table ( ) {
96
62
let mut table = HashTable :: with_capacity ( 100 ) ;
0 commit comments