File tree Expand file tree Collapse file tree 1 file changed +2
-21
lines changed Expand file tree Collapse file tree 1 file changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -241,29 +241,10 @@ impl Module {
241241
242242 fn write_fns ( & self , file : & mut File ) -> Result < ( ) > {
243243 for ( qualified_struct_wrapper, fns) in & self . fns {
244+ assert ! ( qualified_struct_wrapper. is_empty( ) ) ;
244245 writeln ! ( file) ?;
245- let common_attrs = if qualified_struct_wrapper. is_empty ( ) {
246- Vec :: new ( )
247- } else {
248- self . common_attrs ( qualified_struct_wrapper)
249- } ;
250- if !qualified_struct_wrapper. is_empty ( ) {
251- let attrs = self
252- . struct_wrappers
253- . get ( qualified_struct_wrapper)
254- . map ( |struct_wrapper| struct_wrapper. attrs . clone ( ) )
255- . unwrap_or_default ( ) ;
256- let ( _, struct_wrapper) = qualified_struct_wrapper. extract_initial_path ( ) ;
257- let attrs = join_attrs ( attrs. iter ( ) . chain ( & common_attrs) ) ;
258- writeln ! (
259- file,
260- "{attrs}impl {} for {} {{" ,
261- struct_wrapper. to_string( ) ,
262- qualified_struct_wrapper. to_string( ) ,
263- ) ?;
264- }
265246 for Fn { attrs, sig, body } in fns {
266- let attrs = join_attrs ( & remove_common_attrs ( attrs. clone ( ) , & common_attrs ) ) ;
247+ let attrs = join_attrs ( attrs) ;
267248 writeln ! ( file, "{attrs}{sig} {{{body}}}" ) ?;
268249 }
269250 if !qualified_struct_wrapper. is_empty ( ) {
You can’t perform that action at this time.
0 commit comments