@@ -20,7 +20,6 @@ use std::collections::HashMap;
20
20
use std:: hash:: { Hash , Hasher } ;
21
21
use std:: marker:: PhantomData ;
22
22
use std:: ops:: Deref ;
23
- use std:: path:: PathBuf ;
24
23
use std:: sync:: { LazyLock , Mutex } ;
25
24
use std:: { fmt, mem} ;
26
25
@@ -51,26 +50,11 @@ impl<T> PartialEq for Interned<T> {
51
50
}
52
51
impl < T > Eq for Interned < T > { }
53
52
54
- impl PartialEq < str > for Interned < String > {
55
- fn eq ( & self , other : & str ) -> bool {
56
- * self == other
57
- }
58
- }
59
53
impl PartialEq < & str > for Interned < String > {
60
54
fn eq ( & self , other : & & str ) -> bool {
61
55
* * self == * * other
62
56
}
63
57
}
64
- impl < T > PartialEq < & Interned < T > > for Interned < T > {
65
- fn eq ( & self , other : & & Self ) -> bool {
66
- self . 0 == other. 0
67
- }
68
- }
69
- impl < T > PartialEq < Interned < T > > for & Interned < T > {
70
- fn eq ( & self , other : & Interned < T > ) -> bool {
71
- self . 0 == other. 0
72
- }
73
- }
74
58
75
59
unsafe impl < T > Send for Interned < T > { }
76
60
unsafe impl < T > Sync for Interned < T > { }
@@ -188,8 +172,6 @@ impl<T: Hash + Clone + Eq> TyIntern<T> {
188
172
#[ derive( Default ) ]
189
173
pub struct Interner {
190
174
strs : Mutex < TyIntern < String > > ,
191
- paths : Mutex < TyIntern < PathBuf > > ,
192
- lists : Mutex < TyIntern < Vec < String > > > ,
193
175
}
194
176
195
177
/// Defines the behavior required for a type to be internable.
@@ -210,18 +192,6 @@ impl Internable for String {
210
192
}
211
193
}
212
194
213
- impl Internable for PathBuf {
214
- fn intern_cache ( ) -> & ' static Mutex < TyIntern < Self > > {
215
- & INTERNER . paths
216
- }
217
- }
218
-
219
- impl Internable for Vec < String > {
220
- fn intern_cache ( ) -> & ' static Mutex < TyIntern < Self > > {
221
- & INTERNER . lists
222
- }
223
- }
224
-
225
195
impl Interner {
226
196
/// Interns a string reference, ensuring it is stored uniquely.
227
197
///
0 commit comments