1
0
mirror of https://github.com/pcvolkmer/osc-variant.git synced 2025-04-19 19:56:50 +00:00

refactor: collect to String

This commit is contained in:
Paul-Christian Volkmer 2024-12-14 14:09:26 +01:00
parent e45661c84c
commit 8be859d274
2 changed files with 3 additions and 7 deletions

View File

@ -136,8 +136,7 @@ impl Requires for DataCatalogue {
}) })
.filter(Option::is_some) .filter(Option::is_some)
.flatten() .flatten()
.collect::<Vec<_>>() .collect::<String>()
.join("")
) )
} }
} }

View File

@ -124,9 +124,7 @@ where
_ => None, _ => None,
}) })
.filter_map(|item| item.map(|item| format!(" - {item}\n"))) .filter_map(|item| item.map(|item| format!(" - {item}\n")))
.collect::<Vec<_>>() .collect::<String>();
.join("");
if inner.is_empty() { if inner.is_empty() {
Some(format!(" + {}\n", x.to_listed_string())) Some(format!(" + {}\n", x.to_listed_string()))
} else { } else {
@ -152,8 +150,7 @@ where
}) })
.filter(Option::is_some) .filter(Option::is_some)
.flatten() .flatten()
.collect::<Vec<_>>() .collect::<String>()
.join("")
) )
} }
} }