utils: use itertools

utils
This commit is contained in:
Luna Yao
2026-02-21 00:20:22 +01:00
parent 2cd208fad4
commit 0fdfbc2636
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ pub fn sanitize(name: &str) -> String {
.to_string()
})
.filter(|label| !label.is_empty())
.collect::<Vec<_>>()
.collect_vec()
.join(".");
name.truncate(253);
if dot {
+1 -1
View File
@@ -49,7 +49,7 @@ where
type Error = <Model as TryFrom<&'m Message>>::Error;
fn try_from(value: &'m Vec<Message>) -> Result<Self, Self::Error> {
Ok(Self(value.into_iter().map_try_into().try_collect()?))
Ok(Self(value.iter().map_try_into().try_collect()?))
}
}