File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ impl Decodable for Symbol {
157
157
}
158
158
159
159
impl PartialEq < InternedString > for Symbol {
160
+ #[ inline]
160
161
fn eq ( & self , other : & InternedString ) -> bool {
161
162
// Compare pointers
162
163
self . as_str ( ) == * other
@@ -370,11 +371,20 @@ impl<U: ?Sized> ::std::convert::AsRef<U> for InternedString where str: ::std::co
370
371
}
371
372
372
373
impl :: std:: cmp:: PartialEq < InternedString > for InternedString {
374
+ #[ inline]
373
375
fn eq ( & self , other : & InternedString ) -> bool {
374
376
self . as_ptr ( ) == other. as_ptr ( )
375
377
}
376
378
}
377
379
380
+ impl PartialEq < Symbol > for InternedString {
381
+ #[ inline]
382
+ fn eq ( & self , other : & Symbol ) -> bool {
383
+ // Compare pointers
384
+ * self == other. as_str ( )
385
+ }
386
+ }
387
+
378
388
macro_rules! impl_partial_eq_for_symbol_and_interned_string {
379
389
( $( impl $( <$impl_lt: lifetime>) * for $t: ty; ) * ) => ( $(
380
390
impl <$( $impl_lt) ,* > :: std:: cmp:: PartialEq <$t> for InternedString {
You can’t perform that action at this time.
0 commit comments