diff options
| author | James Munns <[email protected]> | 2025-07-15 14:58:41 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-09-11 14:45:06 +0200 |
| commit | b5c9e721009fd4331cdc1ce58a07698eb54f2959 (patch) | |
| tree | b9c16135d07d70011779d1a2eaaba965de446894 /embassy-executor/src/raw | |
| parent | 4479f5bbfce9002b965f9e3e189cdd5c61096eff (diff) | |
Rename, remove excess mut
Diffstat (limited to 'embassy-executor/src/raw')
| -rw-r--r-- | embassy-executor/src/raw/run_queue.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/embassy-executor/src/raw/run_queue.rs b/embassy-executor/src/raw/run_queue.rs index 1eb5775d8..97060f4b9 100644 --- a/embassy-executor/src/raw/run_queue.rs +++ b/embassy-executor/src/raw/run_queue.rs | |||
| @@ -176,9 +176,9 @@ impl<T: Linked<cordyceps::stack::Links<T>>> MutexTransferStack<T> { | |||
| 176 | // like `take_all`) that could ever allow for re-entrant aliasing. Therefore, the | 176 | // like `take_all`) that could ever allow for re-entrant aliasing. Therefore, the |
| 177 | // presence of the critical section is sufficient to guarantee exclusive access to | 177 | // presence of the critical section is sufficient to guarantee exclusive access to |
| 178 | // the `inner` field for the purposes of this function. | 178 | // the `inner` field for the purposes of this function. |
| 179 | let mut guard = unsafe { &mut *self.inner.borrow(token).get() }; | 179 | let inner = unsafe { &mut *self.inner.borrow(token).get() }; |
| 180 | let is_empty = guard.is_empty(); | 180 | let is_empty = inner.is_empty(); |
| 181 | guard.push(item); | 181 | inner.push(item); |
| 182 | is_empty | 182 | is_empty |
| 183 | } | 183 | } |
| 184 | 184 | ||
| @@ -190,8 +190,8 @@ impl<T: Linked<cordyceps::stack::Links<T>>> MutexTransferStack<T> { | |||
| 190 | // like `push_was_empty`) that could ever allow for re-entrant aliasing. Therefore, the | 190 | // like `push_was_empty`) that could ever allow for re-entrant aliasing. Therefore, the |
| 191 | // presence of the critical section is sufficient to guarantee exclusive access to | 191 | // presence of the critical section is sufficient to guarantee exclusive access to |
| 192 | // the `inner` field for the purposes of this function. | 192 | // the `inner` field for the purposes of this function. |
| 193 | let mut guard = unsafe { &mut *self.inner.borrow(cs).get() }; | 193 | let inner = unsafe { &mut *self.inner.borrow(cs).get() }; |
| 194 | guard.take_all() | 194 | inner.take_all() |
| 195 | }) | 195 | }) |
| 196 | } | 196 | } |
| 197 | } | 197 | } |
