This commit is contained in:
Hocuri
2022-10-14 16:32:20 +02:00
parent 4d641cbc78
commit 74fb567470

View File

@@ -670,16 +670,6 @@ pub(crate) fn parse_receive_headers(headers: &Headers) -> String {
.join("\n")
}
pub(crate) fn single_value<T>(collection: impl IntoIterator<Item = T>) -> Option<T> {
let mut iter = collection.into_iter();
if let Some(value) = iter.next() {
if iter.next().is_none() {
return Some(value);
}
}
None
}
#[cfg(test)]
mod tests {
#![allow(clippy::indexing_slicing)]