Skip to content

Commit

Permalink
unsure abt this one
Browse files Browse the repository at this point in the history
  • Loading branch information
larziwau authored Nov 28, 2024
1 parent cd7b5c2 commit a93bb15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/game/src/util/lockfreemutcell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ impl<T> LockfreeMutCell<T> {
///
/// #3) With great power comes great responsibility.
#[allow(clippy::mut_from_ref)]
pub unsafe fn get_mut(&self) -> &mut T {
pub fn get_mut(&self) -> &mut T {
&mut *self.cell.get()
}

pub unsafe fn swap(&self, new: T) -> T {
std::mem::replace(self.get_mut(), new)
pub fn swap(&self, new: T) -> T {
std::mem::replace(unsafe self.get_mut(), new)
}
}

0 comments on commit a93bb15

Please sign in to comment.