Skip to content

Commit

Permalink
Use mem::forget
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-Bertholet committed Dec 8, 2023
1 parent b47cf52 commit edf7482
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/semaphore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ impl SemaphoreGuard<'_> {
/// Drops the guard _without_ releasing the acquired permit.
#[inline]
pub fn forget(self) {
let _ = core::mem::ManuallyDrop::new(self);
core::mem::forget(self);
}
}

Expand Down

0 comments on commit edf7482

Please sign in to comment.