From 01926b56bd73a04d15bba92bae9d198d2d21dcf7 Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Wed, 6 Dec 2023 01:30:22 -0500 Subject: [PATCH] `clippy`: unnecessary_cast warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/cmd/count.rs:76:43 | 76 | woutinfo!("{};{}", HumanCount(count as u64), HumanCount(width as u64)); | ^^^^^^^^^^^^ help: try: `count` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/cmd/count.rs:78:40 | 78 | woutinfo!("{}", HumanCount(count as u64)); | ^^^^^^^^^^^^ help: try: `count` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast --- src/cmd/count.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/count.rs b/src/cmd/count.rs index a96ad5ec8..78bb13140 100644 --- a/src/cmd/count.rs +++ b/src/cmd/count.rs @@ -73,9 +73,9 @@ pub fn run(argv: &[&str]) -> CliResult<()> { use indicatif::HumanCount; if args.flag_width { - woutinfo!("{};{}", HumanCount(count as u64), HumanCount(width as u64)); + woutinfo!("{};{}", HumanCount(count), HumanCount(width as u64)); } else { - woutinfo!("{}", HumanCount(count as u64)); + woutinfo!("{}", HumanCount(count)); } } else if args.flag_width { woutinfo!("{count};{width}");