Skip to content

Commit

Permalink
clippy: unnecessary_cast
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jqnatividad committed Dec 6, 2023
1 parent 21b2337 commit 01926b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/count.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
Expand Down

0 comments on commit 01926b5

Please sign in to comment.