Attempt to fix bugs related to empty vecs

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-03-14 22:38:20 +00:00
parent 8202255132
commit 10365745aa
25 changed files with 253 additions and 238 deletions

View File

@@ -58,12 +58,13 @@ where
}
}
pub fn remove_slash_from_symbols<S>(pairs: &[String], serializer: S) -> Result<S::Ok, S::Error>
pub fn remove_slash_from_symbols<'a, S, I>(pairs: I, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
I: IntoIterator<Item = &'a String>,
{
let symbols = pairs
.iter()
.into_iter()
.map(|pair| remove_slash(pair))
.collect::<Vec<_>>();