From 74de9bc84d2face23ea9d821571b4714b6475fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20F=C3=A4rnstrand?= Date: Sun, 24 Nov 2019 21:41:53 +0100 Subject: [PATCH] Test with integer instead of unit type Clippy complained that: `assert_eq` of unit values detected. This will always succeed --- src/remutex.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/remutex.rs b/src/remutex.rs index 615232ed..6fdf107d 100644 --- a/src/remutex.rs +++ b/src/remutex.rs @@ -69,18 +69,18 @@ mod tests { #[test] fn smoke() { - let m = ReentrantMutex::new(()); + let m = ReentrantMutex::new(2); { let a = m.lock(); { let b = m.lock(); { let c = m.lock(); - assert_eq!(*c, ()); + assert_eq!(*c, 2); } - assert_eq!(*b, ()); + assert_eq!(*b, 2); } - assert_eq!(*a, ()); + assert_eq!(*a, 2); } }