aboutsummaryrefslogtreecommitdiff
path: root/embassy-sync/src
diff options
context:
space:
mode:
authorUlf Lilleengen <[email protected]>2025-09-17 11:52:36 +0200
committerGitHub <[email protected]>2025-09-17 11:52:36 +0200
commit12cb85c54c97e8d8081611018c065be2957171c5 (patch)
tree71e84122a1703c99dee227a9f2e76f919fe41163 /embassy-sync/src
parent40f5161c326166380b1af19170e7db15644b92b1 (diff)
parent90f6497959adf6f0f0a65f1c53be0bd6b0e3f1a7 (diff)
Merge branch 'main' into usb_dfu_reset
Diffstat (limited to 'embassy-sync/src')
-rw-r--r--embassy-sync/src/mutex.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-sync/src/mutex.rs b/embassy-sync/src/mutex.rs
index 4ce6dd987..aea682899 100644
--- a/embassy-sync/src/mutex.rs
+++ b/embassy-sync/src/mutex.rs
@@ -187,7 +187,7 @@ where
187 T: ?Sized, 187 T: ?Sized,
188{ 188{
189 /// Returns a locked view over a portion of the locked data. 189 /// Returns a locked view over a portion of the locked data.
190 pub fn map<U>(this: Self, fun: impl FnOnce(&mut T) -> &mut U) -> MappedMutexGuard<'a, M, U> { 190 pub fn map<U: ?Sized>(this: Self, fun: impl FnOnce(&mut T) -> &mut U) -> MappedMutexGuard<'a, M, U> {
191 let mutex = this.mutex; 191 let mutex = this.mutex;
192 let value = fun(unsafe { &mut *this.mutex.inner.get() }); 192 let value = fun(unsafe { &mut *this.mutex.inner.get() });
193 // Don't run the `drop` method for MutexGuard. The ownership of the underlying 193 // Don't run the `drop` method for MutexGuard. The ownership of the underlying
@@ -279,7 +279,7 @@ where
279 T: ?Sized, 279 T: ?Sized,
280{ 280{
281 /// Returns a locked view over a portion of the locked data. 281 /// Returns a locked view over a portion of the locked data.
282 pub fn map<U>(this: Self, fun: impl FnOnce(&mut T) -> &mut U) -> MappedMutexGuard<'a, M, U> { 282 pub fn map<U: ?Sized>(this: Self, fun: impl FnOnce(&mut T) -> &mut U) -> MappedMutexGuard<'a, M, U> {
283 let state = this.state; 283 let state = this.state;
284 let value = fun(unsafe { &mut *this.value }); 284 let value = fun(unsafe { &mut *this.value });
285 // Don't run the `drop` method for MutexGuard. The ownership of the underlying 285 // Don't run the `drop` method for MutexGuard. The ownership of the underlying