@@ -54,12 +54,11 @@ impl ToTokens for InterfaceData<'_> {
54
54
let name = & self . name ;
55
55
let implements = & self . attrs . extends ;
56
56
let methods_sig = & self . methods ;
57
- let path = & self . path ;
58
57
let constants = & self . constants ;
59
58
60
- let constructor = self . constructor
59
+ let _constructor = self . constructor
61
60
. as_ref ( )
62
- . map ( |func| func. constructor_meta ( & path) )
61
+ . map ( |func| func. constructor_meta ( & self . path ) )
63
62
. option_tokens ( ) ;
64
63
65
64
quote ! {
@@ -209,15 +208,7 @@ impl<'a> Parse<'a, InterfaceData<'a>> for ItemTrait {
209
208
let interface_name = format_ident ! ( "PhpInterface{ident}" ) ;
210
209
let ts = quote ! { #interface_name } ;
211
210
let path: Path = syn:: parse2 ( ts) ?;
212
- let mut data = InterfaceData :: new (
213
- ident,
214
- name,
215
- path,
216
- attrs,
217
- None ,
218
- Vec :: new ( ) ,
219
- Vec :: new ( )
220
- ) ;
211
+ let mut data = InterfaceData :: new ( ident, name, path, attrs, None , Vec :: new ( ) , Vec :: new ( ) ) ;
221
212
222
213
for item in & mut self . items {
223
214
match item {
@@ -230,7 +221,7 @@ impl<'a> Parse<'a, InterfaceData<'a>> for ItemTrait {
230
221
}
231
222
}
232
223
} ;
233
- } ,
224
+ }
234
225
TraitItem :: Const ( c) => data. constants . push ( c. parse ( ) ?) ,
235
226
_ => { }
236
227
}
@@ -265,15 +256,10 @@ impl<'a> Parse<'a, MethodKind<'a>> for TraitItemFn {
265
256
bail ! ( self => "Interface could not have default impl" ) ;
266
257
}
267
258
268
- let php_attr = PhpFunctionInterfaceAttribute :: from_attributes (
269
- & self . attrs
270
- ) ?;
259
+ let php_attr = PhpFunctionInterfaceAttribute :: from_attributes ( & self . attrs ) ?;
271
260
self . attrs . clean_php ( ) ;
272
261
273
- let mut args = Args :: parse_from_fnargs (
274
- self . sig . inputs . iter ( ) ,
275
- php_attr. defaults
276
- ) ?;
262
+ let mut args = Args :: parse_from_fnargs ( self . sig . inputs . iter ( ) , php_attr. defaults ) ?;
277
263
278
264
let docs = get_docs ( & php_attr. attrs ) ?;
279
265
0 commit comments