From 3693ff16683e864814d138675e99d3a8f5f747bc Mon Sep 17 00:00:00 2001 From: Ayrton Chilibeck Date: Fri, 12 Jan 2024 23:01:28 -0700 Subject: [PATCH] Fixed README to include threading --- README.md | 4 ++-- src/validate.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 680488e..b72023f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This is a (mostly) drop-in replacement for the previous tester written for CMPUT 415. Most of the options are specified in the [config file](#configuration-file), so the cli is minimal. We do specify some options: -``` rust +``` Usage: tester [OPTIONS] --config-file Commands: @@ -14,11 +14,11 @@ Commands: Options: -v, --verbosity... Sets the verbosity of the tester + -t, --threads Set the number of threads (only valid in run and grade mode) -c, --config-file Set the config file -g, --grading-conf Set the grading config file -h, --help Print help -V, --version Print version - ``` the verbosity defines the level of logging, you can play around with it (specify `-v[v]+` for more verbose logging). diff --git a/src/validate.rs b/src/validate.rs index 231868e..9b90c42 100644 --- a/src/validate.rs +++ b/src/validate.rs @@ -15,12 +15,12 @@ pub fn validate(verbosity: u8, config: util::config::Config) { } fn get_dir_files(path: PathBuf) -> Result, &'static str> { - let mut res: Vec; + let mut res: Vec = vec![]; // get the readout of the path for error handling let entries = match fs::read_dir(path) { Ok(x) => x, - Err(error) => return Err("Failed to read from the given directory"), + Err(..) => return Err("Failed to read from the given directory"), }; for entry in entries { @@ -37,11 +37,11 @@ fn get_dir_files(path: PathBuf) -> Result, &'static str> { fn check_suffix(path: PathBuf, suf: String) -> bool { - return + return false; } fn check_match(path1: PathBuf, path2: PathBuf, in_suf: String, out_suf: String) -> bool { - + return false; }