std: fix lint on SGX

This commit is contained in:
joboet 2024-04-16 16:50:21 +02:00
parent dbda4f91aa
commit 10b6ca139e
No known key found for this signature in database
GPG Key ID: 704E0149B0194B3C

View File

@ -64,7 +64,7 @@ pub fn lock_var_mut(&mut self) -> &mut T {
#[derive(Copy, Clone)]
pub enum NotifiedTcs {
Single(Tcs),
All { count: NonZero<usize> },
All { _count: NonZero<usize> },
}
/// An RAII guard that will notify a set of target threads as well as unlock
@ -232,7 +232,10 @@ pub fn notify_all<T>(
}
if let Some(count) = NonZero::new(count) {
Ok(WaitGuard { mutex_guard: Some(guard), notified_tcs: NotifiedTcs::All { count } })
Ok(WaitGuard {
mutex_guard: Some(guard),
notified_tcs: NotifiedTcs::All { _count: count },
})
} else {
Err(guard)
}