docs: fix some cargo doc warnings

This commit is contained in:
Côme ALLART 2021-11-02 18:49:01 +01:00
parent bc76a24eaf
commit 3dd39e3d46
3 changed files with 8 additions and 8 deletions

View file

@ -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 <https://github.com/rust-embedded/mutex-trait>.
pub trait Mutex {
/// Data protected by the mutex.
type Data;

View file

@ -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 <https://docs.rs/tokio/0.1.22/tokio/sync/mpsc/fn.channel.html>
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<T> defmt::Format for SendError<T> {
}
/// 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<T> {
/// The data could not be sent on the channel because the channel is

View file

@ -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<F>(&self, token: SpawnToken<F>) -> 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<F: Send>(&self, token: SpawnToken<F>) -> Result<(), SpawnError> {
let header = token.raw_task;
mem::forget(token);