Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
flxoacn committed Jun 18, 2024
1 parent 1771cb8 commit 8bc169e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/filewriter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl<'a, T: Writer> FileWriter<T> {

let overwrite = args.is_present("overwrite");

let records = records_per_file.unwrap_or(std::usize::MAX);
let records = records_per_file.unwrap_or(usize::MAX);
let filename_format = match args.value_of("filename_format") {
Some("enumerate") => FilenameFormat::Enumerate(overwrite, records),
Some("date") => FilenameFormat::Date(overwrite, records),
Expand All @@ -158,7 +158,7 @@ impl<'a, T: Writer> FileWriter<T> {
)
} else {
(
ProgressBar::new(std::u64::MAX),
ProgressBar::new(u64::MAX),
" • ",
"{spinner:.yellow} {msg:.dim.bold} {pos:>7.dim} {elapsed_precise:.dim}",
)
Expand Down
1 change: 0 additions & 1 deletion src/lossy_lines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use futures::{Poll, Stream};
use std::{
cmp,
io::{self, BufRead},
usize,
};
use tokio::{
codec::{Decoder, Encoder},
Expand Down
2 changes: 1 addition & 1 deletion src/subcommands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ pub fn bugreport(args: &ArgMatches) {
.expect("Failed to create outfile parent directory");
}

let progress = ProgressBar::new(::std::u64::MAX);
let progress = ProgressBar::new(u64::MAX);
progress.set_style(
ProgressStyle::default_bar()
.template("{spinner:.yellow} {msg:.dim.bold} {pos:>7.dim} {elapsed_precise:.dim}")
Expand Down
2 changes: 1 addition & 1 deletion src/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ impl Human {
Ok(())
};

let payload_len = terminal_width().unwrap_or(std::usize::MAX) - preamble_width - 3;
let payload_len = terminal_width().unwrap_or(usize::MAX) - preamble_width - 3;
let message = record.message.replace('\t', "");
let message_len = message.chars().count();
let chunks = message_len / payload_len + 1;
Expand Down

0 comments on commit 8bc169e

Please sign in to comment.