1pub trait Setoid {
2 fn equals(&self, other: &Self) -> bool;
3}
4
5impl Setoid for Vec<i32> {
6 fn equals(&self, other: &Self) -> bool {
7 self.len() == other.len()
8 }
9}
10
11impl Setoid for &str {
12 fn equals(&self, other: &Self) -> bool {
13 self.eq(other)
14 }
15}