@@ -106,7 +106,7 @@ pl_rust_cargo_getsrc (char *option)
106106
107107
108108void
109- write_rust_config (const char * path , const char * url )
109+ pl_write_rust_config (const char * path , const char * url )
110110{
111111 remove (path );
112112 char * content = RAWSTR_pl_rust_cargo_config ;
@@ -143,7 +143,7 @@ pl_rust_cargo_setsrc (char *option)
143143 XyStrFindResult_t result_has_mirror = xy_str_find (raw_content , "replace-with" );
144144 if (!result_has_mirror .found )
145145 {
146- write_rust_config (cargo_config_file , source .url );
146+ pl_write_rust_config (cargo_config_file , source .url );
147147 goto finish ;
148148 }
149149
@@ -156,15 +156,15 @@ pl_rust_cargo_setsrc (char *option)
156156 XyStrFindResult_t result_mirror = xy_str_find (raw_content , xy_strcat (3 , "[source." , mirror_name , "]" ));
157157 if (!result_mirror .found )
158158 {
159- write_rust_config (cargo_config_file , source .url );
159+ pl_write_rust_config (cargo_config_file , source .url );
160160 goto finish ;
161161 }
162162
163163 char * mirror_url = xy_str_take_until_newline (raw_content + result_mirror .end + 1 );
164164 mirror_url = xy_str_gsub (mirror_url , " " , "" );
165165 if (!xy_str_find (mirror_url , "registry" ).found )
166166 {
167- write_rust_config (cargo_config_file , source .url );
167+ pl_write_rust_config (cargo_config_file , source .url );
168168 goto finish ;
169169 }
170170 mirror_url = xy_str_delete_prefix (mirror_url , "registry=\"" );
@@ -176,7 +176,7 @@ pl_rust_cargo_setsrc (char *option)
176176 goto finish ;
177177 }
178178
179- write_rust_config (cargo_config_file , source .url );
179+ pl_write_rust_config (cargo_config_file , source .url );
180180 goto finish ;
181181
182182finish :
0 commit comments