@@ -282,20 +282,17 @@ fn (mut g Gen) gen_str_for_alias(info ast.Alias, styp string, str_fn_name string
282282 g.auto_str_funcs.writeln ('${g.static_non_parallel} string indent_${str_fn_name} (${arg_def} , ${ast.int_type_name} indent_count) {' )
283283 old := g.reset_tmp_count ()
284284 defer { g.tmp_count = old }
285- g.auto_str_funcs.writeln ('\t string indents = builtin__string_repeat(_S(" "), indent_count);' )
286285 if str_method_expects_ptr {
287286 it_arg := if is_c_struct { 'it' } else { '&it' }
288287 g.auto_str_funcs.writeln ('\t string tmp_ds = ${parent_str_fn_name} (${it_arg} );' )
289288 } else {
290289 deref , _ := deref_kind (str_method_expects_ptr, info.parent_type.is_ptr (), info.parent_type)
291290 g.auto_str_funcs.writeln ('\t string tmp_ds = ${parent_str_fn_name} (${deref} it);' )
292291 }
293- g.auto_str_funcs.writeln ('\t string res = builtin__str_intp(3, _MOV((StrIntpData[]){
294- {_SLIT0, ${si_s_code} , {.d_s = indents }},
292+ g.auto_str_funcs.writeln ('\t string res = builtin__str_intp(2, _MOV((StrIntpData[]){
295293 {_S("${clean_type_v_type_name} ("), ${si_s_code} , {.d_s = tmp_ds }},
296294 {_S(")"), 0, {.d_c = 0 }}
297295 }));' )
298- g.auto_str_funcs.writeln ('\t builtin__string_free(&indents);' )
299296 g.auto_str_funcs.writeln ('\t builtin__string_free(&tmp_ds);' )
300297 g.auto_str_funcs.writeln ('\t return res;' )
301298 g.auto_str_funcs.writeln ('}' )
0 commit comments