@@ -69,12 +69,7 @@ impl Creator {
6969 // Replace the variables in the path
7070 let mut dest_path_str = dest_path. to_str ( ) . expect ( "The path should be valid" ) . to_string ( ) ;
7171 for ( var_name, var_value) in & self . source_variable_values {
72- let new_var_name = format ! (
73- "{}{}{}" ,
74- Self :: TEMPLATE_VAR_PREFIX ,
75- var_name,
76- Self :: TEMPLATE_VAR_SUFFIX
77- ) ;
72+ let new_var_name = format ! ( "{}{}{}" , Self :: TEMPLATE_VAR_PREFIX , var_name, Self :: TEMPLATE_VAR_SUFFIX ) ;
7873 dest_path_str = dest_path_str. replace ( & new_var_name, var_value) ;
7974 }
8075
@@ -93,12 +88,7 @@ impl Creator {
9388 // Replace the variables in the path
9489 let mut dest_path_str = dest_path. to_str ( ) . expect ( "The path should be valid" ) . to_string ( ) ;
9590 for ( var_name, var_value) in & self . source_variable_values {
96- let new_var_name = format ! (
97- "{}{}{}" ,
98- Self :: TEMPLATE_VAR_PREFIX ,
99- var_name,
100- Self :: TEMPLATE_VAR_SUFFIX
101- ) ;
91+ let new_var_name = format ! ( "{}{}{}" , Self :: TEMPLATE_VAR_PREFIX , var_name, Self :: TEMPLATE_VAR_SUFFIX ) ;
10292 dest_path_str = dest_path_str. replace ( & new_var_name, var_value) ;
10393 }
10494 debug ! ( "Dest path: {:?}\n " , dest_path_str) ;
@@ -110,12 +100,7 @@ impl Creator {
110100 let content = fs:: read_to_string ( & dest_path_str) ?;
111101 let mut new_content = content. clone ( ) ;
112102 for ( var_name, var_value) in & self . source_variable_values {
113- let var_name = format ! (
114- "{}{}{}" ,
115- Self :: TEMPLATE_VAR_PREFIX ,
116- var_name,
117- Self :: TEMPLATE_VAR_SUFFIX
118- ) ;
103+ let var_name = format ! ( "{}{}{}" , Self :: TEMPLATE_VAR_PREFIX , var_name, Self :: TEMPLATE_VAR_SUFFIX ) ;
119104 new_content = new_content. replace ( & var_name, var_value) ;
120105 }
121106 // Write the new content
0 commit comments