@@ -49,7 +49,7 @@ pl_rust_cargo_prelude (void)
4949
5050
5151void
52- rust_cargo_note_get_src_default ()
52+ pl_rust_cargo_note_get_src_default ()
5353{
5454 if (ENGLISH )
5555 chsrc_note2 ("No source configured in Cargo, showing default upstream source:" );
@@ -61,7 +61,7 @@ rust_cargo_note_get_src_default ()
6161}
6262
6363void
64- rust_cargo_note_get_src_mirror (char * url , bool sparse )
64+ pl_rust_cargo_note_get_src_mirror (char * url , bool sparse )
6565{
6666 if (ENGLISH )
6767 {
@@ -94,20 +94,20 @@ pl_rust_cargo_getsrc (char *option)
9494 XyStrFindResult_t result_mirror = xy_str_find (formatted_content , xy_strcat (3 , "[source." , mirror_name , "]" ));
9595 if (!result_mirror .found )
9696 {
97- rust_cargo_note_get_src_default ();
97+ pl_rust_cargo_note_get_src_default ();
9898 return ;
9999 }
100100 char * mirror_url = xy_str_take_until_newline (formatted_content + result_mirror .end + 1 );
101101 mirror_url = xy_str_delete_prefix (mirror_url , "registry=\"" );
102102 mirror_url = xy_str_delete_suffix (mirror_url , "\"" );
103103 if (xy_str_find (mirror_url , "sparse+" ).found )
104104 {
105- rust_cargo_note_get_src_mirror (xy_str_delete_prefix (mirror_url , "sparse+" ), true);
105+ pl_rust_cargo_note_get_src_mirror (xy_str_delete_prefix (mirror_url , "sparse+" ), true);
106106 }
107107 }
108108 else
109109 {
110- rust_cargo_note_get_src_default ();
110+ pl_rust_cargo_note_get_src_default ();
111111 }
112112}
113113
@@ -146,8 +146,6 @@ pl_rust_cargo_setsrc (char *option)
146146 chsrc_backup (cargo_config_file );
147147
148148 char * raw_content = xy_file_to_str (cargo_config_file );
149- char * formatted_content = xy_str_gsub (raw_content , " " , "" );
150- formatted_content = xy_str_gsub (raw_content , "\"" , "" );
151149
152150 XyStrFindResult_t result_has_mirror = xy_str_find (raw_content , "replace-with" );
153151 if (!result_has_mirror .found )
0 commit comments