diff options
| author | murilo ijanc | 2025-11-20 18:26:39 -0300 |
|---|---|---|
| committer | murilo ijanc | 2025-11-20 18:26:39 -0300 |
| commit | b350104bb80267c7c873cfb59f5225a1032df355 (patch) | |
| tree | a085a8096765c6f3518d816450118999d9782a34 | |
| parent | 864b64b70e0ee02bc843a2eb7e3547ffb32205d7 (diff) | |
| download | imgst-b350104bb80267c7c873cfb59f5225a1032df355.tar.gz | |
Fix typos and error messages
| -rw-r--r-- | src/main.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs index 77d32b1..a522e57 100644 --- a/src/main.rs +++ b/src/main.rs @@ -55,11 +55,11 @@ struct Args { #[arg(short, long)] input: PathBuf, - /// Ouput directoryu where cleaned images will be written + /// Output directory where cleaned images will be written #[arg(short, long)] output: PathBuf, - /// Number of worker threads for directory walking + /// Number of worker threads for directory walking (0 = auto) #[arg(long, default_value_t = 0)] num_threads: usize, @@ -90,7 +90,7 @@ fn main() -> anyhow::Result<()> { } else if !args.output.is_dir() { bail!( "output path '{}' exists but is not directory", - args.input.display() + args.output.display() ); } @@ -197,9 +197,9 @@ fn process_img( ) -> anyhow::Result<()> { let rel_path = match src.strip_prefix(input_root) { Ok(rel) => rel.to_path_buf(), - Err(_) => { - src.file_name().map(PathBuf::from).ok_or_else(|| anyhow!(""))? - } + Err(_) => src.file_name().map(PathBuf::from).ok_or_else(|| { + anyhow!("could not compute relative path for '{}'", src.display()) + })?, }; let dst = output_root.join(rel_path); |