3 fn equal(&self, other: &Self) -> bool;
4 fn equals<T,U>(&self, this: &T, that: &T, x: &U, y: &U) -> bool
8 impl<T> Equal for T where T: Eq {
9 fn equal(&self, other: &T) -> bool {
12 fn equals<U,X>(&self, this: &U, other: &U, x: &X, y: &X) -> bool
14 this == other && x == y
18 fn equal<T>(x: &T, y: &T) -> bool where T: Eq {
23 println!("{}", equal(&1, &2));
24 println!("{}", equal(&1, &1));
25 println!("{}", "hello".equal(&"hello"));
26 println!("{}", "hello".equals::<isize,&str>(&1, &1, &"foo", &"bar"));