diff options
| -rw-r--r-- | embassy/src/blocking_mutex/mod.rs | 2 | ||||
| -rw-r--r-- | embassy/src/channel/mpsc.rs | 10 | ||||
| -rw-r--r-- | embassy/src/executor/spawner.rs | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/embassy/src/blocking_mutex/mod.rs b/embassy/src/blocking_mutex/mod.rs index 641a1ed93..8ada27cb3 100644 --- a/embassy/src/blocking_mutex/mod.rs +++ b/embassy/src/blocking_mutex/mod.rs | |||
| @@ -7,7 +7,7 @@ use critical_section::CriticalSection; | |||
| 7 | 7 | ||
| 8 | /// Any object implementing this trait guarantees exclusive access to the data contained | 8 | /// Any object implementing this trait guarantees exclusive access to the data contained |
| 9 | /// within the mutex for the duration of the lock. | 9 | /// within the mutex for the duration of the lock. |
| 10 | /// Adapted from https://github.com/rust-embedded/mutex-trait. | 10 | /// Adapted from <https://github.com/rust-embedded/mutex-trait>. |
| 11 | pub trait Mutex { | 11 | pub trait Mutex { |
| 12 | /// Data protected by the mutex. | 12 | /// Data protected by the mutex. |
| 13 | type Data; | 13 | type Data; |
diff --git a/embassy/src/channel/mpsc.rs b/embassy/src/channel/mpsc.rs index 9a57c0b19..8d4b817a4 100644 --- a/embassy/src/channel/mpsc.rs +++ b/embassy/src/channel/mpsc.rs | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | //! consumes the channel to completion, at which point the receiver can be | 35 | //! consumes the channel to completion, at which point the receiver can be |
| 36 | //! dropped. | 36 | //! dropped. |
| 37 | //! | 37 | //! |
| 38 | //! This channel and its associated types were derived from https://docs.rs/tokio/0.1.22/tokio/sync/mpsc/fn.channel.html | 38 | //! This channel and its associated types were derived from <https://docs.rs/tokio/0.1.22/tokio/sync/mpsc/fn.channel.html> |
| 39 | 39 | ||
| 40 | use core::cell::RefCell; | 40 | use core::cell::RefCell; |
| 41 | use core::fmt; | 41 | use core::fmt; |
| @@ -259,8 +259,8 @@ where | |||
| 259 | /// [`Receiver`] is dropped, or when the [`Receiver::close`] method is | 259 | /// [`Receiver`] is dropped, or when the [`Receiver::close`] method is |
| 260 | /// called. | 260 | /// called. |
| 261 | /// | 261 | /// |
| 262 | /// [`Receiver`]: crate::sync::mpsc::Receiver | 262 | /// [`Receiver`]: Receiver |
| 263 | /// [`Receiver::close`]: crate::sync::mpsc::Receiver::close | 263 | /// [`Receiver::close`]: Receiver::close |
| 264 | pub fn is_closed(&self) -> bool { | 264 | pub fn is_closed(&self) -> bool { |
| 265 | self.channel.lock(|c| c.is_closed()) | 265 | self.channel.lock(|c| c.is_closed()) |
| 266 | } | 266 | } |
| @@ -342,7 +342,7 @@ where | |||
| 342 | 342 | ||
| 343 | /// An error returned from the [`try_recv`] method. | 343 | /// An error returned from the [`try_recv`] method. |
| 344 | /// | 344 | /// |
| 345 | /// [`try_recv`]: super::Receiver::try_recv | 345 | /// [`try_recv`]: Receiver::try_recv |
| 346 | #[derive(PartialEq, Eq, Clone, Copy, Debug)] | 346 | #[derive(PartialEq, Eq, Clone, Copy, Debug)] |
| 347 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 347 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| 348 | pub enum TryRecvError { | 348 | pub enum TryRecvError { |
| @@ -371,7 +371,7 @@ impl<T> defmt::Format for SendError<T> { | |||
| 371 | } | 371 | } |
| 372 | 372 | ||
| 373 | /// This enumeration is the list of the possible error outcomes for the | 373 | /// This enumeration is the list of the possible error outcomes for the |
| 374 | /// [try_send](super::Sender::try_send) method. | 374 | /// [try_send](Sender::try_send) method. |
| 375 | #[derive(Debug)] | 375 | #[derive(Debug)] |
| 376 | pub enum TrySendError<T> { | 376 | pub enum TrySendError<T> { |
| 377 | /// The data could not be sent on the channel because the channel is | 377 | /// The data could not be sent on the channel because the channel is |
diff --git a/embassy/src/executor/spawner.rs b/embassy/src/executor/spawner.rs index 908e139ae..c9874e6c8 100644 --- a/embassy/src/executor/spawner.rs +++ b/embassy/src/executor/spawner.rs | |||
| @@ -77,7 +77,7 @@ impl Spawner { | |||
| 77 | 77 | ||
| 78 | /// Spawn a task into an executor. | 78 | /// Spawn a task into an executor. |
| 79 | /// | 79 | /// |
| 80 | /// You obtain the `token` by calling a task function (i.e. one marked with `#[embassy::task]). | 80 | /// You obtain the `token` by calling a task function (i.e. one marked with `#[embassy::task]`). |
| 81 | pub fn spawn<F>(&self, token: SpawnToken<F>) -> Result<(), SpawnError> { | 81 | pub fn spawn<F>(&self, token: SpawnToken<F>) -> Result<(), SpawnError> { |
| 82 | let task = token.raw_task; | 82 | let task = token.raw_task; |
| 83 | mem::forget(token); | 83 | mem::forget(token); |
| @@ -129,7 +129,7 @@ unsafe impl Sync for SendSpawner {} | |||
| 129 | impl SendSpawner { | 129 | impl SendSpawner { |
| 130 | /// Spawn a task into an executor. | 130 | /// Spawn a task into an executor. |
| 131 | /// | 131 | /// |
| 132 | /// You obtain the `token` by calling a task function (i.e. one marked with `#[embassy::task]). | 132 | /// You obtain the `token` by calling a task function (i.e. one marked with `#[embassy::task]`). |
| 133 | pub fn spawn<F: Send>(&self, token: SpawnToken<F>) -> Result<(), SpawnError> { | 133 | pub fn spawn<F: Send>(&self, token: SpawnToken<F>) -> Result<(), SpawnError> { |
| 134 | let header = token.raw_task; | 134 | let header = token.raw_task; |
| 135 | mem::forget(token); | 135 | mem::forget(token); |
