docs: Use intradoc links for method references. (#9958)

# Objective

- Use intradoc links to let the compiler verify correctness.

## Solution

- Use intradoc links.
This commit is contained in:
Bruce Mitchener 2023-09-29 14:09:14 +07:00 committed by GitHub
parent edba496697
commit a5a457c3c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,9 +88,9 @@ pub trait Command: Send + 'static {
/// ///
/// # Implementing /// # Implementing
/// ///
/// Each built-in command is implemented as a separate method, e.g. [`spawn`](#method.spawn). /// Each built-in command is implemented as a separate method, e.g. [`Commands::spawn`].
/// In addition to the pre-defined command methods, you can add commands with any arbitrary /// In addition to the pre-defined command methods, you can add commands with any arbitrary
/// behavior using [`Commands::add`](#method.add), which accepts any type implementing [`Command`]. /// behavior using [`Commands::add`], which accepts any type implementing [`Command`].
/// ///
/// Since closures and other functions implement this trait automatically, this allows one-shot, /// Since closures and other functions implement this trait automatically, this allows one-shot,
/// anonymous custom commands. /// anonymous custom commands.