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

fix some lines_filter_map_ok clippy warnings

This commit is contained in:
Sylvestre Ledru 2023-05-06 14:53:28 +02:00
parent f8d7bebed3
commit cd688662ec
2 changed files with 2 additions and 2 deletions

View file

@ -136,7 +136,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
));
} else if files[0].eq("-") {
let fin = BufReader::new(std::io::stdin());
result = parse(fin.lines().filter_map(Result::ok), &out_format, files[0]);
result = parse(fin.lines().map_while(Result::ok), &out_format, files[0]);
} else {
let path = Path::new(files[0]);
if path.is_dir() {

View file

@ -409,7 +409,7 @@ pub fn read_fs_list() -> Result<Vec<MountInfo>, std::io::Error> {
let reader = BufReader::new(f);
Ok(reader
.lines()
.filter_map(|line| line.ok())
.map_while(Result::ok)
.filter_map(|line| {
let raw_data = line.split_whitespace().collect::<Vec<&str>>();
MountInfo::new(file_name, &raw_data)