1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

cut: refactor mode args counting by removing nested map

This commit is contained in:
wolimst 2024-02-14 20:02:42 +09:00
parent 0ac8606577
commit 6bec96aad1

View file

@ -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 (