Skip to content

Use a byte buffer to explain testing std::io::Write output - #307

Open
AmanBoronbaev wants to merge 1 commit into
rust-cli:masterfrom
AmanBoronbaev:describe-byte-buffer-for-test-output
Open

AmanBoronbaev wants to merge 1 commit into
rust-cli:masterfrom
AmanBoronbaev:describe-byte-buffer-for-test-output

Conversation

@AmanBoronbaev

Copy link
Copy Markdown

The testing chapter suggests passing a string to a helper that accepts std::io::Write. Passing &mut String fails that trait bound. Describe the Vec<u8> that the example actually passes, and explain what the test compares with its byte string literal.

I checked both types with rustc, ran the testing chapter's unit and integration tests, and rebuilt the book with its CI version of mdBook (0.4.14).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant