Skip to content

Commit cd68866

Browse files
committed
fix some lines_filter_map_ok clippy warnings
1 parent f8d7beb commit cd68866

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/uu/dircolors/src/dircolors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
136136
));
137137
} else if files[0].eq("-") {
138138
let fin = BufReader::new(std::io::stdin());
139-
result = parse(fin.lines().filter_map(Result::ok), &out_format, files[0]);
139+
result = parse(fin.lines().map_while(Result::ok), &out_format, files[0]);
140140
} else {
141141
let path = Path::new(files[0]);
142142
if path.is_dir() {

src/uucore/src/lib/features/fsext.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ pub fn read_fs_list() -> Result<Vec<MountInfo>, std::io::Error> {
409409
let reader = BufReader::new(f);
410410
Ok(reader
411411
.lines()
412-
.filter_map(|line| line.ok())
412+
.map_while(Result::ok)
413413
.filter_map(|line| {
414414
let raw_data = line.split_whitespace().collect::<Vec<&str>>();
415415
MountInfo::new(file_name, &raw_data)

0 commit comments

Comments
 (0)