Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve discoverability of tokio_util::codec module #2523

Merged
merged 11 commits into from
May 14, 2020

Conversation

RadicalZephyr
Copy link
Contributor

@RadicalZephyr RadicalZephyr commented May 12, 2020

This is my attempt at improving the documentation and visibilty of the codec module.

I think directly mentioning that it converts between AsyncRead/AsyncWrite and Sink/Stream in the module description is a little clearer at least.

I also added a section to the tokio::io module describing what codec is used for.

Fixes #2475

@RadicalZephyr
Copy link
Contributor Author

Since it was such a small typo I also added a patch that fixes #2468

The section on the two traits at the beginning is very busy looking
with every instance of AsyncRead and AsyncWrite as a hyper link. With
only one instance of each trait name linked the set of links pops in a
more useful way.
fixed:
  - removed repeated "the"
  - rephrased slightly
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a lot of broken links. Please check out CONTRIBUTING.md for instructions on how to properly build the documentation. The command to build it is:

RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features

If you use the stable cargo doc command, a lot of the automated link verification will not work. You should also ensure that your nightly install is recent.

tokio/src/io/mod.rs Show resolved Hide resolved
tokio/src/io/mod.rs Outdated Show resolved Hide resolved
tokio-util/src/codec/mod.rs Show resolved Hide resolved
  - correct links to Encoder/Decoder
  - fix futures links
  - fix stream links
@RadicalZephyr
Copy link
Contributor Author

Dang, I knew I was building the docs wrong! I've fixed the broken links now.

Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks reasonable. You have touched a bunch of links that appeared to work correctly before, but I'm ok with making them use intra-rustdoc links explicitly.

tokio/src/io/mod.rs Show resolved Hide resolved
tokio/src/io/mod.rs Outdated Show resolved Hide resolved
@Darksonn Darksonn added A-tokio Area: The main tokio crate A-tokio-util Area: The tokio-util crate C-maintenance Category: PRs that clean code up or issues documenting cleanup. M-codec Module: tokio-util/codec M-io Module: tokio/io T-docs Topic: documentation labels May 13, 2020
@Darksonn Darksonn merged commit b44ab27 into tokio-rs:master May 14, 2020
@RadicalZephyr RadicalZephyr deleted the codec-docs branch May 15, 2020 01:51
jensim pushed a commit to jensim/tokio that referenced this pull request Jun 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate A-tokio-util Area: The tokio-util crate C-maintenance Category: PRs that clean code up or issues documenting cleanup. M-codec Module: tokio-util/codec M-io Module: tokio/io T-docs Topic: documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make codec more discoverable
2 participants