pub fn contains(&self, x: &A::Item) -> bool
    where
        A::Item: PartialEq<A::Item>,
    {
        let (a, b) = self.as_slices();
        a.contains(x) || b.contains(x)
    }
/// Returns `true` if the `ArrayDeque` contains an element equal to the
/// given value.
///
/// # Examples
///
/// ```
/// use arraydeque::ArrayDeque;
///
/// let mut buf: ArrayDeque<[_; 2]> = ArrayDeque::new();
///
/// buf.push_back(1);
/// buf.push_back(2);
///
/// assert_eq!(buf.contains(&1), true);
/// assert_eq!(buf.contains(&3), false);
/// ```
Returns `true` if the `ArrayDeque` contains an element equal to the
given value.
Returns ` true ` if the ` ArrayDeque ` contains an element equal to the given value .
pub fn contains(&self, x: &A::Item) -> bool
    where
        A::Item: PartialEq<A::Item>,
    {
        let (a, b) = self.as_slices();
        a.contains(x) || b.contains(x)
    }
pub fn contains ( & self , x : & A :: Item ) -> bool where A :: Item : PartialEq < A :: Item > , { let ( a , b ) = self . as_slices ( ) ; a . contains ( x ) || b . contains ( x ) }
Returns `true` if the `ArrayDeque` contains an element equal to the
given value.
Returns ` true ` if the ` ArrayDeque ` contains an element equal to the given value .
&self
x
&A::Item
examples
```
use arraydeque::ArrayDeque.

let mut buf: ArrayDeque<[_; 2]> = ArrayDeque::new().



assert_eq!(buf.contains(&1), true);
assert_eq!(buf.contains(&3), false);
```
` ` ` use arraydeque :: ArrayDeque . let mut buf : ArrayDeque< [ _ ; 2 ] > = ArrayDeque :: new () . assert_eq! ( buf . contains ( &1 ) true ) ; assert_eq! ( buf . contains ( &3 ) false ) ; ` ` `