mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
fix some lines_filter_map_ok clippy warnings
This commit is contained in:
parent
f8d7bebed3
commit
cd688662ec
2 changed files with 2 additions and 2 deletions
|
@ -136,7 +136,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
));
|
));
|
||||||
} else if files[0].eq("-") {
|
} else if files[0].eq("-") {
|
||||||
let fin = BufReader::new(std::io::stdin());
|
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 {
|
} else {
|
||||||
let path = Path::new(files[0]);
|
let path = Path::new(files[0]);
|
||||||
if path.is_dir() {
|
if path.is_dir() {
|
||||||
|
|
|
@ -409,7 +409,7 @@ pub fn read_fs_list() -> Result<Vec<MountInfo>, std::io::Error> {
|
||||||
let reader = BufReader::new(f);
|
let reader = BufReader::new(f);
|
||||||
Ok(reader
|
Ok(reader
|
||||||
.lines()
|
.lines()
|
||||||
.filter_map(|line| line.ok())
|
.map_while(Result::ok)
|
||||||
.filter_map(|line| {
|
.filter_map(|line| {
|
||||||
let raw_data = line.split_whitespace().collect::<Vec<&str>>();
|
let raw_data = line.split_whitespace().collect::<Vec<&str>>();
|
||||||
MountInfo::new(file_name, &raw_data)
|
MountInfo::new(file_name, &raw_data)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue