Skip to content

Commit

Permalink
cut: refactor mode args counting by removing nested map
Browse files Browse the repository at this point in the history
  • Loading branch information
wolimst authored and ysthakur committed Feb 27, 2024
1 parent cdc86b0 commit b6e2a0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/uu/cut/src/cut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
matches.indices_of(options::FIELDS),
]
.into_iter()
.filter_map(|mode| mode.map(|indices| indices.len()))
.map(|indices| indices.unwrap_or_default().count())
.sum();

let mode_parse = match (
Expand Down

0 comments on commit b6e2a0a

Please sign in to comment.