File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ #![ recursion_limit = "128" ]
1
2
#![ feature( proc_macro, proc_macro_lib) ]
2
3
3
4
extern crate proc_macro;
@@ -34,6 +35,27 @@ pub fn impl_object(input: TokenStream) -> TokenStream {
34
35
}
35
36
}
36
37
}
38
+
39
+ impl #impl_generics :: std:: cmp:: PartialEq for #name #ty_generics #where_clause {
40
+ fn eq( & self , other: & Self ) -> bool {
41
+ use :: objc_foundation:: INSObject ;
42
+ self . is_equal( other)
43
+ }
44
+ }
45
+
46
+ impl #impl_generics :: std:: hash:: Hash for #name #ty_generics #where_clause {
47
+ fn hash<H >( & self , state: & mut H ) where H : :: std:: hash:: Hasher {
48
+ use :: objc_foundation:: INSObject ;
49
+ self . hash_code( ) . hash( state) ;
50
+ }
51
+ }
52
+
53
+ impl #impl_generics :: std:: fmt:: Debug for #name #ty_generics #where_clause {
54
+ fn fmt( & self , f: & mut :: std:: fmt:: Formatter ) -> :: std:: fmt:: Result {
55
+ use :: objc_foundation:: { INSObject , INSString } ;
56
+ :: std:: fmt:: Debug :: fmt( self . description( ) . as_str( ) , f)
57
+ }
58
+ }
37
59
} ;
38
60
39
61
// Return the generated impl
You can’t perform that action at this time.
0 commit comments