From 01322f69a406eee76014f5e2834336e2295ad80e Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 25 Nov 2020 07:11:27 +0100 Subject: Use recently stabilized intra-doc links See RFC: https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md --- futures/src/subscription.rs | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'futures/src/subscription.rs') diff --git a/futures/src/subscription.rs b/futures/src/subscription.rs index e97ff3ab..2dfa523b 100644 --- a/futures/src/subscription.rs +++ b/futures/src/subscription.rs @@ -19,8 +19,7 @@ use crate::BoxStream; /// This type is normally aliased by runtimes with a specific `Event` and/or /// `Hasher`. /// -/// [`Command`]: ../struct.Command.html -/// [`Subscription`]: struct.Subscription.html +/// [`Command`]: crate::Command pub struct Subscription { recipes: Vec>>, } @@ -30,8 +29,6 @@ where H: std::hash::Hasher, { /// Returns an empty [`Subscription`] that will not produce any output. - /// - /// [`Subscription`]: struct.Subscription.html pub fn none() -> Self { Self { recipes: Vec::new(), @@ -39,9 +36,6 @@ where } /// Creates a [`Subscription`] from a [`Recipe`] describing it. - /// - /// [`Subscription`]: struct.Subscription.html - /// [`Recipe`]: trait.Recipe.html pub fn from_recipe( recipe: impl Recipe + 'static, ) -> Self { @@ -52,8 +46,6 @@ where /// Batches all the provided subscriptions and returns the resulting /// [`Subscription`]. - /// - /// [`Subscription`]: struct.Subscription.html pub fn batch( subscriptions: impl IntoIterator>, ) -> Self { @@ -66,8 +58,6 @@ where } /// Returns the different recipes of the [`Subscription`]. - /// - /// [`Subscription`]: struct.Subscription.html pub fn recipes(self) -> Vec>> { self.recipes } @@ -75,8 +65,6 @@ where /// Adds a value to the [`Subscription`] context. /// /// The value will be part of the identity of a [`Subscription`]. - /// - /// [`Subscription`]: struct.Subscription.html pub fn with(mut self, value: T) -> Subscription where H: 'static, @@ -97,8 +85,6 @@ where } /// Transforms the [`Subscription`] output with the given function. - /// - /// [`Subscription`]: struct.Subscription.html pub fn map(mut self, f: fn(O) -> A) -> Subscription where H: 'static, @@ -131,9 +117,6 @@ impl std::fmt::Debug for Subscription { /// by runtimes to run and identify subscriptions. You can use it to create your /// own! /// -/// [`Subscription`]: struct.Subscription.html -/// [`Recipe`]: trait.Recipe.html -/// /// # Examples /// The repository has a couple of [examples] that use a custom [`Recipe`]: /// @@ -148,17 +131,11 @@ impl std::fmt::Debug for Subscription { pub trait Recipe { /// The events that will be produced by a [`Subscription`] with this /// [`Recipe`]. - /// - /// [`Subscription`]: struct.Subscription.html - /// [`Recipe`]: trait.Recipe.html type Output; /// Hashes the [`Recipe`]. /// /// This is used by runtimes to uniquely identify a [`Subscription`]. - /// - /// [`Subscription`]: struct.Subscription.html - /// [`Recipe`]: trait.Recipe.html fn hash(&self, state: &mut Hasher); /// Executes the [`Recipe`] and produces the stream of events of its @@ -166,9 +143,6 @@ pub trait Recipe { /// /// It receives some stream of generic events, which is normally defined by /// shells. - /// - /// [`Subscription`]: struct.Subscription.html - /// [`Recipe`]: trait.Recipe.html fn stream( self: Box, input: BoxStream, -- cgit