Skip to content

Commit

Permalink
fix: Change return lifetime to fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
jhg committed Apr 27, 2024
1 parent 7c5811e commit 89c5e4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub(super) fn retrieve<T>(pointer: *const T) {
writable_lent_pointers().remove(&(pointer as usize));
}

fn writable_lent_pointers() -> RwLockWriteGuard<'_, HashSet<usize>> {
fn writable_lent_pointers() -> RwLockWriteGuard<'static, HashSet<usize>> {
let Ok(lent_pointers) = LENT_POINTERS.write() else {
log::error!("RwLock poisoned, it is not possible to add or remove pointers");
unreachable!("RwLock poisoned when there is not panics in code that can hold it");
Expand Down

0 comments on commit 89c5e4b

Please sign in to comment.