From 16d14d45d97b348cdd78dc4f4c2a05fb34bdc89d Mon Sep 17 00:00:00 2001 From: S John CD Date: Fri, 22 Dec 2023 19:27:52 +0000 Subject: [PATCH] markdown lint --- deps/README.md | 1 - src/concurrency/futures.md | 6 +++--- src/topics/documentation.md | 5 +---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/deps/README.md b/deps/README.md index 6645d8fb..859581ed 100644 --- a/deps/README.md +++ b/deps/README.md @@ -3,4 +3,3 @@ This is a stub project required for `mdbook-keeper` as a way of collecting all dependencies for `mdbook test`. Run `cargo add ` in this folder or edit `Cargo.toml` in this folder to add dependencies that the Rust code embedded into the book markdown requires. - diff --git a/src/concurrency/futures.md b/src/concurrency/futures.md index 69225f34..49ef9d32 100644 --- a/src/concurrency/futures.md +++ b/src/concurrency/futures.md @@ -5,7 +5,7 @@ In most cases, you will use this crate directly only when writing async code intended to work for multiple runtimes. Otherwise, use the utilities provided by the ecosystem of your choice - [Tokio](./tokio.md) for example. -### Selecting futures +## Selecting futures `Select` polls multiple futures and streams simultaneously, executing the branch for the future that finishes first. If multiple futures are ready, one will be pseudo-randomly selected at runtime. @@ -34,7 +34,7 @@ fn main() { } ``` -### Joining futures +## Joining futures ```rust,ignore async fn foo(i: u32) -> u32 { i } @@ -47,7 +47,7 @@ let futures = vec![foo(1), foo(2), foo(3)]; assert_eq!(futures::future::join_all(futures).await, [1, 2, 3]); ``` -### Map, then, either, flatten +## Map, then, either, flatten The `futures` crate provides an extension trait that provides a variety of convenient adapters. diff --git a/src/topics/documentation.md b/src/topics/documentation.md index 701a24cc..6feb0f3c 100644 --- a/src/topics/documentation.md +++ b/src/topics/documentation.md @@ -9,7 +9,7 @@ 1) Add documentation comments to your code. ```rust,ignore -/// This is a doc comment. It is equivalent to the next line. +/// This is a doc comment. It is equivalent to the next line. #[doc = r" This is a doc comment."] ``` @@ -39,10 +39,8 @@ Any item annotated with `#[doc(hidden)]` will not appear in the documentation. - 2) Run `rustdoc src/lib.rs --crate-name ` or `cargo doc --open` to create a new directory, `doc` (or `target/doc` when using cargo), with a website inside. - ## Module- or crate-level documentation Use `//!` at the top of the file (instead of `///`) for module-level documentation. @@ -66,7 +64,6 @@ The first lines within `lib.rs` will compose the crate-level documentation front #![doc(html_playground_url = "https://playground.example.com/")] ``` - ## Badges [Shield.io]( https://shields.io/ )