From 3dd39e3d46eae91ccc0773f1ac5d31b6469c16e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20ALLART?= Date: Tue, 2 Nov 2021 18:49:01 +0100 Subject: [PATCH] docs: fix some `cargo doc` warnings --- embassy/src/blocking_mutex/mod.rs | 2 +- embassy/src/channel/mpsc.rs | 10 +++++----- 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 641a1ed9..8ada27cb 100644 --- a/embassy/src/blocking_mutex/mod.rs +++ b/embassy/src/blocking_mutex/mod.rs @@ -7,7 +7,7 @@ use critical_section::CriticalSection; /// Any object implementing this trait guarantees exclusive access to the data contained /// within the mutex for the duration of the lock. -/// Adapted from https://github.com/rust-embedded/mutex-trait. +/// Adapted from . pub trait Mutex { /// Data protected by the mutex. type Data; diff --git a/embassy/src/channel/mpsc.rs b/embassy/src/channel/mpsc.rs index 9a57c0b1..8d4b817a 100644 --- a/embassy/src/channel/mpsc.rs +++ b/embassy/src/channel/mpsc.rs @@ -35,7 +35,7 @@ //! consumes the channel to completion, at which point the receiver can be //! dropped. //! -//! This channel and its associated types were derived from https://docs.rs/tokio/0.1.22/tokio/sync/mpsc/fn.channel.html +//! This channel and its associated types were derived from use core::cell::RefCell; use core::fmt; @@ -259,8 +259,8 @@ where /// [`Receiver`] is dropped, or when the [`Receiver::close`] method is /// called. /// - /// [`Receiver`]: crate::sync::mpsc::Receiver - /// [`Receiver::close`]: crate::sync::mpsc::Receiver::close + /// [`Receiver`]: Receiver + /// [`Receiver::close`]: Receiver::close pub fn is_closed(&self) -> bool { self.channel.lock(|c| c.is_closed()) } @@ -342,7 +342,7 @@ where /// An error returned from the [`try_recv`] method. /// -/// [`try_recv`]: super::Receiver::try_recv +/// [`try_recv`]: Receiver::try_recv #[derive(PartialEq, Eq, Clone, Copy, Debug)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] pub enum TryRecvError { @@ -371,7 +371,7 @@ impl defmt::Format for SendError { } /// This enumeration is the list of the possible error outcomes for the -/// [try_send](super::Sender::try_send) method. +/// [try_send](Sender::try_send) method. #[derive(Debug)] pub enum TrySendError { /// 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 908e139a..c9874e6c 100644 --- a/embassy/src/executor/spawner.rs +++ b/embassy/src/executor/spawner.rs @@ -77,7 +77,7 @@ impl Spawner { /// Spawn a task into an executor. /// - /// You obtain the `token` by calling a task function (i.e. one marked with `#[embassy::task]). + /// You obtain the `token` by calling a task function (i.e. one marked with `#[embassy::task]`). pub fn spawn(&self, token: SpawnToken) -> Result<(), SpawnError> { let task = token.raw_task; mem::forget(token); @@ -129,7 +129,7 @@ unsafe impl Sync for SendSpawner {} impl SendSpawner { /// Spawn a task into an executor. /// - /// You obtain the `token` by calling a task function (i.e. one marked with `#[embassy::task]). + /// You obtain the `token` by calling a task function (i.e. one marked with `#[embassy::task]`). pub fn spawn(&self, token: SpawnToken) -> Result<(), SpawnError> { let header = token.raw_task; mem::forget(token);