Skip to main content

oxilean_std/hashset/
oxihashset_from_iter_group.rs

1//! # OxiHashSet - from_iter_group Methods
2//!
3//! This module contains method implementations for `OxiHashSet`.
4//!
5//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
6
7use super::oxihashset_type::OxiHashSet;
8use std::hash::Hash;
9
10impl<T: Eq + Hash + Clone> OxiHashSet<T> {
11    /// Create a set from an iterator.
12    #[allow(clippy::should_implement_trait)]
13    pub fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self {
14        Self {
15            inner: iter.into_iter().collect(),
16        }
17    }
18}