Skip to content

Commit

Permalink
markdown lint
Browse files Browse the repository at this point in the history
  • Loading branch information
john-cd committed Dec 22, 2023
1 parent f29f85e commit 16d14d4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion deps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <crate>` in this folder or edit `Cargo.toml` in this folder to add dependencies that the Rust code embedded into the book markdown requires.

6 changes: 3 additions & 3 deletions src/concurrency/futures.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -34,7 +34,7 @@ fn main() {
}
```

### Joining futures
## Joining futures

```rust,ignore
async fn foo(i: u32) -> u32 { i }
Expand All @@ -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.

Expand Down
5 changes: 1 addition & 4 deletions src/topics/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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."]
```

Expand Down Expand Up @@ -39,10 +39,8 @@
Any item annotated with `#[doc(hidden)]` will not appear in the documentation.
2) Run `rustdoc src/lib.rs --crate-name <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.
Expand All @@ -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/ )

0 comments on commit 16d14d4

Please sign in to comment.