diff options
author | David Blajda <blajda@hotmail.com> | 2018-12-31 21:26:20 +0000 |
---|---|---|
committer | David Blajda <blajda@hotmail.com> | 2018-12-31 21:26:20 +0000 |
commit | e2078919afbbdbd71422de4d0d834847975d0232 (patch) | |
tree | d0aaa10dee7558bd2e6cb950ad2106d664826a7d | |
parent | 90b079f07c73f4d2ffe93078fe9e8e1df630dbb4 (diff) |
:WIP fix tests
-rw-r--r-- | src/types.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/types.rs b/src/types.rs index f984935..eb97e28 100644 --- a/src/types.rs +++ b/src/types.rs @@ -99,7 +99,7 @@ impl<'a, T> Eq for IntegerId<'a, T> {} impl<'a, T> PartialEq<str> for IntegerId<'a, T> { fn eq(&self, other: &str) -> bool { - self.id == *other + self.id.eq(other) } } @@ -158,12 +158,12 @@ mod tests { assert_eq!(u1, u2); assert_eq!(u1, 1234); - assert_eq!(u1, "1234"); + assert_eq!(&u1, "1234"); let u2 = UserId::from_str("1235").unwrap(); assert_ne!(u1, u2); assert_ne!(u1, 1235); - assert_ne!(u1, "1235"); + assert_ne!(&u1, "1235"); /* This must give a compile error */ /* |