Skip to content

Commit

Permalink
remove an unused type from the reentrant lock tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Apr 22, 2024
1 parent fecb7b4 commit df437a2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions library/std/src/sync/reentrant_lock/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{ReentrantLock, ReentrantLockGuard};
use super::ReentrantLock;
use crate::cell::RefCell;
use crate::sync::Arc;
use crate::thread;
Expand Down Expand Up @@ -51,10 +51,3 @@ fn trylock_works() {
.unwrap();
let _lock3 = l.try_lock();
}

pub struct Answer<'a>(pub ReentrantLockGuard<'a, RefCell<u32>>);
impl Drop for Answer<'_> {
fn drop(&mut self) {
*self.0.borrow_mut() = 42;
}
}

0 comments on commit df437a2

Please sign in to comment.