1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

fix clippy warning

This commit is contained in:
DevSabb 2022-03-28 10:31:27 -04:00
parent f6cb42ee2d
commit 16ad4bc069

View file

@ -76,7 +76,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
let options = Options {
head_count: {
let headcounts = matches
let headcounts: Vec<&str> = matches
.values_of(options::HEAD_COUNT)
.unwrap_or_default()
.collect();
@ -298,7 +298,7 @@ fn parse_range(input_range: &str) -> Result<(usize, usize), String> {
}
}
fn parse_head_count(headcounts: &Vec<&str>) -> Result<usize, String> {
fn parse_head_count(headcounts: &[&str]) -> Result<usize, String> {
let mut result = std::usize::MAX;
for count in headcounts {
match count.parse::<usize>() {