@@ -249,7 +249,7 @@ fn quick_copy_dir<P: AsRef<Path>>(src: P, dest: P, files: Option<P>) -> io::Resu
249249 // Per
250250 // [these docs](https://learn.microsoft.com/en-us/troubleshoot/windows-server/backup-and-storage/return-codes-used-robocopy-utility),
251251 // check the return code.
252- if cfg ! ( windows) && exit_code >= 8 || !cfg ! ( windows) && exit_code != 0 {
252+ if ( cfg ! ( windows) && exit_code >= 8 ) || ( !cfg ! ( windows) && exit_code != 0 ) {
253253 Err ( io:: Error :: other ( format ! (
254254 "Copy process return code {exit_code} indicates failure."
255255 ) ) )
@@ -271,6 +271,8 @@ fn remove_dir_all_if_exists<P: AsRef<Path> + std::fmt::Display>(path: P) -> io::
271271 Ok ( ( ) )
272272}
273273
274+ /// Search and replace a file using the regex. It's currently only used to
275+ /// update the version of a file; it does only one replacement.
274276fn search_and_replace_file <
275277 P : AsRef < Path > + std:: fmt:: Display ,
276278 S1 : AsRef < str > + std:: fmt:: Display ,
@@ -283,6 +285,8 @@ fn search_and_replace_file<
283285 let file_contents = fs:: read_to_string ( & path) ?;
284286 let re = Regex :: new ( search_regex. as_ref ( ) )
285287 . map_err ( |err| io:: Error :: other ( format ! ( "Error in search regex {search_regex}: {err}" ) ) ) ?;
288+ // Note that this does only one replacement -- there should be exactly one
289+ // version number to replace in a file.
286290 let file_contents_replaced = re. replace ( & file_contents, replace_string. as_ref ( ) ) ;
287291 assert_ne ! (
288292 file_contents, file_contents_replaced,
@@ -413,7 +417,7 @@ fn run_install(dev: bool) -> io::Result<()> {
413417 cargo binstall cargo-outdated --no-confirm;
414418 info "cargo binstall cargo-sort" ;
415419 cargo binstall cargo-sort --no-confirm;
416- info "cargo binstall cargo-audio " ;
420+ info "cargo binstall cargo-audit " ;
417421 cargo binstall cargo-audit --no-confirm;
418422 ) ?;
419423 }
@@ -427,7 +431,7 @@ fn run_update() -> io::Result<()> {
427431 run_cmd ! (
428432 info "Builder: cargo update" ;
429433 cargo update --manifest-path=$BUILDER_PATH /Cargo . toml;
430- info "VSCoe extension: cargo update" ;
434+ info "VSCode extension: cargo update" ;
431435 cargo update --manifest-path=$VSCODE_PATH /Cargo . toml;
432436 info "test_utils: cargo update"
433437 cargo update --manifest-path=$TEST_UTILS_PATH /Cargo . toml;
@@ -478,7 +482,7 @@ fn run_format_and_lint(check_only: bool) -> io::Result<()> {
478482 cargo audit --file=$BUILDER_PATH /Cargo . lock --no-fetch;
479483 info "VSCode extension: cargo audit" ;
480484 cargo audit --file=$VSCODE_PATH /Cargo . lock --no-fetch;
481- info "test_utils: cargo clippy and fmt "
485+ info "test_utils: cargo audit "
482486 cargo audit --file=$TEST_UTILS_PATH /Cargo . lock --no-fetch;
483487
484488 info "cargo sort" ;
@@ -578,7 +582,7 @@ fn run_client_build(
578582 true ,
579583 ) ?;
580584
581- // \<a id="#pdf.js>The PDF viewer for use with VSCode. Built it separately,
585+ // \<a id="#pdf.js>The PDF viewer for use with VSCode. Build it separately,
582586 // since it's loaded apart from the rest of the Client.
583587 run_script (
584588 & esbuild,
0 commit comments