diff options
| author | Tyler <[email protected]> | 2023-09-29 20:02:24 -0600 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-29 20:02:24 -0600 |
| commit | 2f9b59c5cf21f1e2761a9ccefdfd86f0edea829c (patch) | |
| tree | 8964744b4fb753cf98f6f413464106c4d2a72976 /embassy-sync/src/channel.rs | |
| parent | ce91fb2bfc846570ef543a09396c428d70675245 (diff) | |
| parent | 95b3d9eb3b3657de3d7bc9c04f8fb83eae901640 (diff) | |
Merge branch 'main' into issue-1974-add-sai-driver
Diffstat (limited to 'embassy-sync/src/channel.rs')
| -rw-r--r-- | embassy-sync/src/channel.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-sync/src/channel.rs b/embassy-sync/src/channel.rs index 62ea1307d..a512e0c41 100644 --- a/embassy-sync/src/channel.rs +++ b/embassy-sync/src/channel.rs | |||
| @@ -471,7 +471,7 @@ where | |||
| 471 | } | 471 | } |
| 472 | 472 | ||
| 473 | fn lock<R>(&self, f: impl FnOnce(&mut ChannelState<T, N>) -> R) -> R { | 473 | fn lock<R>(&self, f: impl FnOnce(&mut ChannelState<T, N>) -> R) -> R { |
| 474 | self.inner.lock(|rc| f(&mut *rc.borrow_mut())) | 474 | self.inner.lock(|rc| f(&mut *unwrap!(rc.try_borrow_mut()))) |
| 475 | } | 475 | } |
| 476 | 476 | ||
| 477 | fn try_receive_with_context(&self, cx: Option<&mut Context<'_>>) -> Result<T, TryReceiveError> { | 477 | fn try_receive_with_context(&self, cx: Option<&mut Context<'_>>) -> Result<T, TryReceiveError> { |
