From 7d8a830f5e560f737bef641816177b1a6c1c9113 Mon Sep 17 00:00:00 2001 From: aplio Date: Tue, 4 Jun 2024 21:14:12 +0900 Subject: [PATCH] refactor: rename colour to color in cli Signed-off-by: aplio --- cli/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/src/lib.rs b/cli/src/lib.rs index 32fc656fef8..267e3de5473 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -775,12 +775,12 @@ fn validate_try_bind_address(emitter: &mut Emitter, value: &WithOri } #[allow(missing_docs)] -pub fn is_colouring_supported() -> bool { +pub fn is_coloring_supported() -> bool { supports_color::on(supports_color::Stream::Stdout).is_some() } fn default_terminal_colors_str() -> clap::builder::OsStr { - is_colouring_supported().to_string().into() + is_coloring_supported().to_string().into() } /// Iroha server CLI @@ -1002,7 +1002,7 @@ mod tests { fn default_args() { let args = Args::try_parse_from(["test"]).unwrap(); - assert_eq!(args.terminal_colors, is_colouring_supported()); + assert_eq!(args.terminal_colors, is_coloring_supported()); assert_eq!(args.submit_genesis, false); } @@ -1015,7 +1015,7 @@ mod tests { assert_eq!( Args::try_parse_from(["test"])?.terminal_colors, - is_colouring_supported() + is_coloring_supported() ); assert_eq!(try_with("--terminal-colors")?, true); assert_eq!(try_with("--terminal-colors=false")?, false);