aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Munns <[email protected]>2025-07-09 12:54:27 +0000
committerGitHub <[email protected]>2025-07-09 12:54:27 +0000
commitba5aea8e6041675a0854b82fba79332608aa10c1 (patch)
tree7d38d70be875d2a8f06139e15268846379bf9d35
parentc599435143e0fedb1be14f6f4cce559fa369feec (diff)
parentfa0f6bc670c29b799e0ef8812de041727c5d86f3 (diff)
Merge pull request #4385 from us-irs/some-minor-doc-fixes
some minor documentation fixes
-rw-r--r--embassy-sync/src/mutex.rs2
-rw-r--r--embassy-sync/src/pipe.rs8
-rw-r--r--embassy-sync/src/priority_channel.rs4
-rw-r--r--embassy-sync/src/pubsub/publisher.rs2
4 files changed, 8 insertions, 8 deletions
diff --git a/embassy-sync/src/mutex.rs b/embassy-sync/src/mutex.rs
index 7528a9f68..8496f34bf 100644
--- a/embassy-sync/src/mutex.rs
+++ b/embassy-sync/src/mutex.rs
@@ -23,7 +23,7 @@ struct State {
23 23
24/// Async mutex. 24/// Async mutex.
25/// 25///
26/// The mutex is generic over a blocking [`RawMutex`](crate::blocking_mutex::raw::RawMutex). 26/// The mutex is generic over a blocking [`RawMutex`].
27/// The raw mutex is used to guard access to the internal "is locked" flag. It 27/// The raw mutex is used to guard access to the internal "is locked" flag. It
28/// is held for very short periods only, while locking and unlocking. It is *not* held 28/// is held for very short periods only, while locking and unlocking. It is *not* held
29/// for the entire time the async Mutex is locked. 29/// for the entire time the async Mutex is locked.
diff --git a/embassy-sync/src/pipe.rs b/embassy-sync/src/pipe.rs
index 2598652d2..df3b28b45 100644
--- a/embassy-sync/src/pipe.rs
+++ b/embassy-sync/src/pipe.rs
@@ -152,7 +152,7 @@ where
152 152
153impl<'p, M, const N: usize> Unpin for ReadFuture<'p, M, N> where M: RawMutex {} 153impl<'p, M, const N: usize> Unpin for ReadFuture<'p, M, N> where M: RawMutex {}
154 154
155/// Future returned by [`Pipe::fill_buf`] and [`Reader::fill_buf`]. 155/// Future returned by [`Reader::fill_buf`].
156#[must_use = "futures do nothing unless you `.await` or poll them"] 156#[must_use = "futures do nothing unless you `.await` or poll them"]
157pub struct FillBufFuture<'p, M, const N: usize> 157pub struct FillBufFuture<'p, M, const N: usize>
158where 158where
@@ -587,7 +587,7 @@ where
587 } 587 }
588} 588}
589 589
590/// Write-only access to a [`DynamicPipe`]. 590/// Write-only access to the dynamic pipe.
591pub struct DynamicWriter<'p> { 591pub struct DynamicWriter<'p> {
592 pipe: &'p dyn DynamicPipe, 592 pipe: &'p dyn DynamicPipe,
593} 593}
@@ -657,7 +657,7 @@ where
657 } 657 }
658} 658}
659 659
660/// Read-only access to a [`DynamicPipe`]. 660/// Read-only access to a dynamic pipe.
661pub struct DynamicReader<'p> { 661pub struct DynamicReader<'p> {
662 pipe: &'p dyn DynamicPipe, 662 pipe: &'p dyn DynamicPipe,
663} 663}
@@ -742,7 +742,7 @@ where
742 } 742 }
743} 743}
744 744
745/// Future returned by [`DynamicPipe::fill_buf`] and [`DynamicReader::fill_buf`]. 745/// Future returned by [`DynamicReader::fill_buf`].
746#[must_use = "futures do nothing unless you `.await` or poll them"] 746#[must_use = "futures do nothing unless you `.await` or poll them"]
747pub struct DynamicFillBufFuture<'p> { 747pub struct DynamicFillBufFuture<'p> {
748 pipe: Option<&'p dyn DynamicPipe>, 748 pipe: Option<&'p dyn DynamicPipe>,
diff --git a/embassy-sync/src/priority_channel.rs b/embassy-sync/src/priority_channel.rs
index 623c52993..715a20e86 100644
--- a/embassy-sync/src/priority_channel.rs
+++ b/embassy-sync/src/priority_channel.rs
@@ -1,7 +1,7 @@
1//! A queue for sending values between asynchronous tasks. 1//! A queue for sending values between asynchronous tasks.
2//! 2//!
3//! Similar to a [`Channel`](crate::channel::Channel), however [`PriorityChannel`] sifts higher priority items to the front of the queue. 3//! Similar to a [`Channel`](crate::channel::Channel), however [`PriorityChannel`] sifts higher priority items to the front of the queue.
4//! Priority is determined by the `Ord` trait. Priority behavior is determined by the [`Kind`](heapless::binary_heap::Kind) parameter of the channel. 4//! Priority is determined by the `Ord` trait. Priority behavior is determined by the [`Kind`] parameter of the channel.
5 5
6use core::cell::RefCell; 6use core::cell::RefCell;
7use core::future::Future; 7use core::future::Future;
@@ -473,7 +473,7 @@ where
473/// received from the channel. 473/// received from the channel.
474/// 474///
475/// Sent data may be reordered based on their priority within the channel. 475/// Sent data may be reordered based on their priority within the channel.
476/// For example, in a [`Max`](heapless::binary_heap::Max) [`PriorityChannel`] 476/// For example, in a [`Max`] [`PriorityChannel`]
477/// containing `u32`'s, data sent in the following order `[1, 2, 3]` will be received as `[3, 2, 1]`. 477/// containing `u32`'s, data sent in the following order `[1, 2, 3]` will be received as `[3, 2, 1]`.
478pub struct PriorityChannel<M, T, K, const N: usize> 478pub struct PriorityChannel<M, T, K, const N: usize>
479where 479where
diff --git a/embassy-sync/src/pubsub/publisher.rs b/embassy-sync/src/pubsub/publisher.rs
index 7a1ab66de..52a52f926 100644
--- a/embassy-sync/src/pubsub/publisher.rs
+++ b/embassy-sync/src/pubsub/publisher.rs
@@ -75,7 +75,7 @@ impl<'a, PSB: PubSubBehavior<T> + ?Sized, T: Clone> Pub<'a, PSB, T> {
75 self.channel.is_full() 75 self.channel.is_full()
76 } 76 }
77 77
78 /// Create a [`futures::Sink`] adapter for this publisher. 78 /// Create a [`futures_sink::Sink`] adapter for this publisher.
79 #[inline] 79 #[inline]
80 pub const fn sink(&self) -> PubSink<'a, '_, PSB, T> { 80 pub const fn sink(&self) -> PubSink<'a, '_, PSB, T> {
81 PubSink { publ: self, fut: None } 81 PubSink { publ: self, fut: None }