mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
fix clippy warning
This commit is contained in:
parent
f6cb42ee2d
commit
16ad4bc069
1 changed files with 2 additions and 2 deletions
|
@ -76,7 +76,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
|
|
||||||
let options = Options {
|
let options = Options {
|
||||||
head_count: {
|
head_count: {
|
||||||
let headcounts = matches
|
let headcounts: Vec<&str> = matches
|
||||||
.values_of(options::HEAD_COUNT)
|
.values_of(options::HEAD_COUNT)
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
.collect();
|
.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;
|
let mut result = std::usize::MAX;
|
||||||
for count in headcounts {
|
for count in headcounts {
|
||||||
match count.parse::<usize>() {
|
match count.parse::<usize>() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue