]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #59498 - mbrubeck:write_all, r=Centril
authorMazdak Farrokhzad <twingoow@gmail.com>
Fri, 29 Mar 2019 01:40:57 +0000 (02:40 +0100)
committerGitHub <noreply@github.com>
Fri, 29 Mar 2019 01:40:57 +0000 (02:40 +0100)
commit0494cffd3ca975aaeb58230cf7904ece05836133
tree9c5d04734e9346a741533cc3a89fe7be91d28943
parentbf3e6c63d6b1a6efec0a65e22fbe9b9013d2705e
parent8dbae794b0683668d1b46d2c319ab36dcd9bd96d
Rollup merge of #59498 - mbrubeck:write_all, r=Centril

Use 'write_all' instead of 'write' in example code

Using `write` without looping and checking the result can cause silent data loss.  Example code should use `write_all` so that people don't copy this pattern.  (Of course this does not include example code for docs that are specifically about the `write` method.)