pub(crate) fn single_value<T>(
collection: impl IntoIterator<Item = T>,
) -> Option<T>
Expand description
If collection
contains exactly one element, return this element.
Otherwise, return None.
pub(crate) fn single_value<T>(
collection: impl IntoIterator<Item = T>,
) -> Option<T>
If collection
contains exactly one element, return this element.
Otherwise, return None.