Skip to content

Commit

Permalink
Test with integer instead of unit type
Browse files Browse the repository at this point in the history
Clippy complained that:
`assert_eq` of unit values detected. This will always succeed
  • Loading branch information
faern committed Nov 24, 2019
1 parent bb9a9b1 commit 74de9bc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/remutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 74de9bc

Please sign in to comment.