1
0
mirror of https://github.com/pcvolkmer/osc-variant.git synced 2025-04-19 11:46: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)
.flatten()
.collect::<Vec<_>>()
.join("")
.collect::<String>()
)
}
}

View File

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