@@ -20,18 +20,18 @@ type HashIndex = hash::PyHash;
20
20
type EntryIndex = usize ;
21
21
22
22
pub struct Dict < T = PyObjectRef > {
23
- inner : PyRwLock < InnerDict < T > > ,
23
+ inner : PyRwLock < DictInner < T > > ,
24
24
}
25
25
26
- struct InnerDict < T > {
26
+ struct DictInner < T > {
27
27
size : usize ,
28
28
indices : HashMap < HashIndex , EntryIndex > ,
29
29
entries : Vec < Option < DictEntry < T > > > ,
30
30
}
31
31
32
- impl < T : Clone > Clone for InnerDict < T > {
32
+ impl < T : Clone > Clone for DictInner < T > {
33
33
fn clone ( & self ) -> Self {
34
- InnerDict {
34
+ DictInner {
35
35
size : self . size ,
36
36
indices : self . indices . clone ( ) ,
37
37
entries : self . entries . clone ( ) ,
@@ -50,7 +50,7 @@ impl<T: Clone> Clone for Dict<T> {
50
50
impl < T > Default for Dict < T > {
51
51
fn default ( ) -> Self {
52
52
Dict {
53
- inner : PyRwLock :: new ( InnerDict {
53
+ inner : PyRwLock :: new ( DictInner {
54
54
size : 0 ,
55
55
indices : HashMap :: new ( ) ,
56
56
entries : Vec :: new ( ) ,
@@ -82,11 +82,11 @@ pub struct DictSize {
82
82
}
83
83
84
84
impl < T : Clone > Dict < T > {
85
- fn borrow_value ( & self ) -> PyRwLockReadGuard < ' _ , InnerDict < T > > {
85
+ fn borrow_value ( & self ) -> PyRwLockReadGuard < ' _ , DictInner < T > > {
86
86
self . inner . read ( )
87
87
}
88
88
89
- fn borrow_value_mut ( & self ) -> PyRwLockWriteGuard < ' _ , InnerDict < T > > {
89
+ fn borrow_value_mut ( & self ) -> PyRwLockWriteGuard < ' _ , DictInner < T > > {
90
90
self . inner . write ( )
91
91
}
92
92
0 commit comments