mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 06:15:45 +01:00
rtic-sync: remove unnecessary with_mut, safety comment
This commit is contained in:
parent
dae55bd7e4
commit
bef2e1b9f0
2 changed files with 7 additions and 11 deletions
|
|
@ -57,10 +57,10 @@ macro_rules! cs_access {
|
|||
where
|
||||
F: FnOnce(&mut $type) -> R,
|
||||
{
|
||||
self.$name.with_mut(|v| {
|
||||
let v = unsafe { &mut *v };
|
||||
f(v)
|
||||
})
|
||||
let v = self.$name.get_mut();
|
||||
// SAFETY: we have exclusive access due to the critical section.
|
||||
let v = unsafe { v.deref() };
|
||||
f(v)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue