carr 0.1.2

Constant-sized arrays using const generics
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Equality check for arrays with differing or equivalent backends.

use crate::arr::Arr;
use crate::backend::Backend;

impl<B1, B2, T, const D: &'static [usize]> PartialEq<Arr<B2, T, D>> for Arr<B1, T, D>
where
    B1: Backend<T>,
    B2: Backend<T>,
    T: PartialEq + Default,
{
    fn eq(&self, other: &Arr<B2, T, D>) -> bool {
        self.storage().as_vec() == other.storage().as_vec()
    }
}