From 221f421464e6672e9cf25629998477946a8b8e1f Mon Sep 17 00:00:00 2001 From: Plecra <60934058+Plecra@users.noreply.github.com> Date: Tue, 12 May 2020 12:47:38 +0100 Subject: codec: rewrite of codec::Framed (#2368) Framed was designed to encapsulate both AsyncRead and AsyncWrite so that it could wrap two-way connections. It used Fuse to manage the pinned io object between the FramedWrite and FramedRead structs. I replaced the Fuse struct by isolating the state used in reading and writing, and making the code generic over that instead. This means the FramedImpl struct now has a parameter for the state, and contains the logic for both directions. The Framed* structs are now simply wrappers around this type Hopefully removing the `Pin` handling made things easier to understand, too. --- CONTRIBUTING.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CONTRIBUTING.md') diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b338838e..772b1dce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -132,9 +132,15 @@ RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features ``` The `cargo fmt` command does not work on the Tokio codebase. You can use the command below instead: + +#### Bash ``` rustfmt --check --edition 2018 $(find . -name '*.rs' -print) ``` +#### Powershell +``` +Get-ChildItem . -Filter "*.rs" -Recurse | foreach { rustfmt --check --edition 2018 $_.FullName } +``` The `--check` argument prints the things that need to be fixed. If you remove it, `rustfmt` will update your files locally instead. -- cgit v1.2.3