pub fn remove<Q>(&mut self, element: &Q) -> Option<A::Item>
    where
        A::Item: Borrow<Q>,
        Q: Ord + ?Sized,
    {
        match self.find(element) {
            Ok(idx) => Some(self.vec.remove(idx)),
            Err(_) => None,
        }
    }
/// Removes and returns the element in the set, if any, that is equal to the given one.
///
/// The element may be any borrowed form of the set's element type,
/// but the ordering on the borrowed form *must* match the
/// ordering on the element type.
///
/// # Examples
///
/// ```
/// use small_ord_set::SmallOrdSet;
///
/// let mut set = SmallOrdSet::<[u32; 4]>::new();
///
/// set.insert(2);
/// assert_eq!(set.remove(&2), Some(2));
/// assert_eq!(set.remove(&2), None);
/// ```
Removes and returns the element in the set, if any, that is equal to the given one.
The element may be any borrowed form of the set's element type,
but the ordering on the borrowed form *must* match the
ordering on the element type.
Removes and returns the element in the set if any that is equal to the given one . The element may be any borrowed form of the set ' s element type but the ordering on the borrowed form * must * match the ordering on the element type .
pub fn remove<Q>(&mut self, element: &Q) -> Option<A::Item>
    where
        A::Item: Borrow<Q>,
        Q: Ord + ?Sized,
    {
        match self.find(element) {
            Ok(idx) => Some(self.vec.remove(idx)),
            Err(_) => None,
        }
    }
pub fn remove < Q > ( & mut self , element : & Q ) -> Option < A :: Item > where A :: Item : Borrow < Q > , Q : Ord + ? Sized , { match self . find ( element ) { Ok ( idx ) => Some ( self . vec . remove ( idx ) ) , Err ( _ ) => None , } }
Removes and returns the element in the set, if any, that is equal to the given one.
Removes and returns the element in the set if any that is equal to the given one .
&mut self
element
&Q
&mut self
element
&Q
examples
```
use small_ord_set::SmallOrdSet.




` ` ` use small_ord_set :: SmallOrdSet .