From a47f41a257c03df8fe7fdaf6c8f158696d2aa405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Rodrigues=20Miguel?= Date: Fri, 19 Mar 2021 11:40:17 -0300 Subject: [PATCH] typo: Decompressable -> Decompressible --- README.md | 6 +++--- src/cli.rs | 8 ++++---- src/error.rs | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c1c50bf..a2c47da 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ info: attempting to decompress input files into single_folder info: done! ``` -When no output file is supplied, `ouch` infers that it must decompress all of its input files. This will error if any of the input files are not decompressable. +When no output file is supplied, `ouch` infers that it must decompress all of its input files. This will error if any of the input files are not decompressible. #### Decompressing a bunch of files into a folder @@ -42,7 +42,7 @@ info: attempting to decompress input files into single_folder info: done! ``` -When the output file is not a compressed file, `ouch` will check if all input files are decompressable and infer that it must decompress them into the output file. +When the output file is not a compressed file, `ouch` will check if all input files are decompressible and infer that it must decompress them into the output file. #### Compressing files @@ -58,7 +58,7 @@ info: done! ```bash $ ouch -i some-file -o some-folder -error: file 'some-file' is not decompressable. +error: file 'some-file' is not decompressible. ``` `ouch` might (TODO!) be able to sniff a file's compression format if it isn't supplied in the future, but that is not currently implemented. diff --git a/src/cli.rs b/src/cli.rs index e6f9e9d..cd9ca2b 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -63,7 +63,7 @@ impl TryFrom> for Command { fn try_from(matches: clap::ArgMatches<'static>) -> error::OuchResult { // Possibilities: - // * Case 1: output not supplied, therefore try to infer output by checking if all input files are decompressable + // * Case 1: output not supplied, therefore try to infer output by checking if all input files are decompressible // * Case 2: output supplied let output_was_supplied = matches.is_present("output"); @@ -98,14 +98,14 @@ impl TryFrom> for Command { } else { - // Checking if input files are decompressable + // Checking if input files are decompressible let input_files = input_files .map(|filename| (filename, CompressionExtension::try_from(filename))); for file in input_files.clone() { if let (file, Err(_)) = file { - eprintln!("{}: file '{}' is not decompressable.", "error".red(), file); - return Err(error::Error::InputsMustHaveBeenDecompressable(file.into())); + // eprintln!("{}: file '{}' is not decompressible.", "error".red(), file); + return Err(error::Error::InputsMustHaveBeenDecompressible(file.into())); } } diff --git a/src/error.rs b/src/error.rs index 9cf1b47..ee9e73b 100644 --- a/src/error.rs +++ b/src/error.rs @@ -8,7 +8,7 @@ pub enum Error { MissingExtensionError(String), InvalidUnicode, InvalidInput, - InputsMustHaveBeenDecompressable(String) + InputsMustHaveBeenDecompressible(String) } // This should be placed somewhere else @@ -26,8 +26,8 @@ impl fmt::Display for Error { Error::MissingExtensionError(filename) => { write!(f, "cannot compress to \'{}\', likely because it has an unsupported (or missing) extension.", filename) } - Error::InputsMustHaveBeenDecompressable(file) => { - write!(f, "file '{}' is not decompressable", file.red()) + Error::InputsMustHaveBeenDecompressible(file) => { + write!(f, "file '{}' is not decompressible", file.red()) } _ => { // TODO