@@ -4,7 +4,7 @@ extern crate quote;
4
4
extern crate syn;
5
5
6
6
use proc_macro:: TokenStream ;
7
- use quote:: { Tokens , ToTokens } ;
7
+ use quote:: { ToTokens , Tokens } ;
8
8
9
9
#[ proc_macro_derive( INSObject ) ]
10
10
pub fn impl_object ( input : TokenStream ) -> TokenStream {
@@ -22,7 +22,8 @@ pub fn impl_object(input: TokenStream) -> TokenStream {
22
22
let mut gen = Tokens :: new ( ) ;
23
23
quote ! (
24
24
unsafe impl #impl_generics :: objc:: Message for #name #ty_generics #where_clause { }
25
- ) . to_tokens ( & mut gen) ;
25
+ )
26
+ . to_tokens ( & mut gen) ;
26
27
27
28
quote ! (
28
29
impl #impl_generics INSObject for #name #ty_generics #where_clause {
@@ -36,32 +37,36 @@ pub fn impl_object(input: TokenStream) -> TokenStream {
36
37
}
37
38
}
38
39
}
39
- ) . to_tokens ( & mut gen) ;
40
+ )
41
+ . to_tokens ( & mut gen) ;
40
42
41
43
quote ! (
42
- impl #impl_generics :: std :: cmp:: PartialEq for #name #ty_generics #where_clause {
44
+ impl #impl_generics :: core :: cmp:: PartialEq for #name #ty_generics #where_clause {
43
45
fn eq( & self , other: & Self ) -> bool {
44
46
INSObject :: is_equal( self , other)
45
47
}
46
48
}
47
- ) . to_tokens ( & mut gen) ;
49
+ )
50
+ . to_tokens ( & mut gen) ;
48
51
49
52
quote ! (
50
- impl #impl_generics :: std :: hash:: Hash for #name #ty_generics #where_clause {
51
- fn hash<H >( & self , state: & mut H ) where H : :: std :: hash:: Hasher {
53
+ impl #impl_generics :: core :: hash:: Hash for #name #ty_generics #where_clause {
54
+ fn hash<H >( & self , state: & mut H ) where H : :: core :: hash:: Hasher {
52
55
INSObject :: hash_code( self ) . hash( state) ;
53
56
}
54
57
}
55
- ) . to_tokens ( & mut gen) ;
58
+ )
59
+ . to_tokens ( & mut gen) ;
56
60
57
61
quote ! (
58
- impl #impl_generics :: std :: fmt:: Debug for #name #ty_generics #where_clause {
59
- fn fmt( & self , f: & mut :: std :: fmt:: Formatter ) -> :: std :: fmt:: Result {
62
+ impl #impl_generics :: core :: fmt:: Debug for #name #ty_generics #where_clause {
63
+ fn fmt( & self , f: & mut :: core :: fmt:: Formatter ) -> :: core :: fmt:: Result {
60
64
let s = INSObject :: description( self ) ;
61
- :: std :: fmt:: Display :: fmt( & * s, f)
65
+ :: core :: fmt:: Display :: fmt( & * s, f)
62
66
}
63
67
}
64
- ) . to_tokens ( & mut gen) ;
68
+ )
69
+ . to_tokens ( & mut gen) ;
65
70
66
71
// Return the generated impl
67
72
gen. parse ( ) . unwrap ( )
0 commit comments