[core] Remove unnecessary #[inline] attributes in lock module.

This commit is contained in:
Jim Blandy authored and Connor Fitzgerald committed 2024-04-25 01:28:21 -04:00
1 parent 3c21a98697
commit d719373989
2 files changed
-4

No files matched your search

-2
View File
@@ -104,7 +104,6 @@ impl LockState {
}
impl<T> Mutex<T> {
#[inline]
pub fn new(rank: LockRank, value: T) -> Mutex<T> {
Mutex {
inner: parking_lot::Mutex::new(value),
@@ -112,7 +111,6 @@ impl<T> Mutex<T> {
}
}
#[inline]
#[track_caller]
pub fn lock(&self) -> MutexGuard<T> {
let state = LOCK_STATE.get();
-2
View File
@@ -21,12 +21,10 @@ pub struct Mutex<T>(parking_lot::Mutex<T>);
pub struct MutexGuard<'a, T>(parking_lot::MutexGuard<'a, T>);
impl<T> Mutex<T> {
#[inline]
pub fn new(_rank: super::rank::LockRank, value: T) -> Mutex<T> {
Mutex(parking_lot::Mutex::new(value))
}
#[inline]
pub fn lock(&self) -> MutexGuard<T> {
MutexGuard(self.0.lock())
}