@@ -54,12 +54,11 @@ impl ToTokens for InterfaceData<'_> {
5454 let name = & self . name ;
5555 let implements = & self . attrs . extends ;
5656 let methods_sig = & self . methods ;
57- let path = & self . path ;
5857 let constants = & self . constants ;
5958
60- let constructor = self . constructor
59+ let _constructor = self . constructor
6160 . as_ref ( )
62- . map ( |func| func. constructor_meta ( & path) )
61+ . map ( |func| func. constructor_meta ( & self . path ) )
6362 . option_tokens ( ) ;
6463
6564 quote ! {
@@ -209,15 +208,7 @@ impl<'a> Parse<'a, InterfaceData<'a>> for ItemTrait {
209208 let interface_name = format_ident ! ( "PhpInterface{ident}" ) ;
210209 let ts = quote ! { #interface_name } ;
211210 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 ( ) ) ;
221212
222213 for item in & mut self . items {
223214 match item {
@@ -230,7 +221,7 @@ impl<'a> Parse<'a, InterfaceData<'a>> for ItemTrait {
230221 }
231222 }
232223 } ;
233- } ,
224+ }
234225 TraitItem :: Const ( c) => data. constants . push ( c. parse ( ) ?) ,
235226 _ => { }
236227 }
@@ -265,15 +256,10 @@ impl<'a> Parse<'a, MethodKind<'a>> for TraitItemFn {
265256 bail ! ( self => "Interface could not have default impl" ) ;
266257 }
267258
268- let php_attr = PhpFunctionInterfaceAttribute :: from_attributes (
269- & self . attrs
270- ) ?;
259+ let php_attr = PhpFunctionInterfaceAttribute :: from_attributes ( & self . attrs ) ?;
271260 self . attrs . clean_php ( ) ;
272261
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 ) ?;
277263
278264 let docs = get_docs ( & php_attr. attrs ) ?;
279265
0 commit comments