about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/snippet.rs
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2021-02-01 14:29:28 +0100
committerGitHub <noreply@github.com>2021-02-01 14:29:28 +0100
commita7a6f013a20fbdf21d77e8ed16f0d8c7b70a7899 (patch)
treea429ac3685b6866f890f5a5a1b7871e32dfecab7 /compiler/rustc_errors/src/snippet.rs
parente0d9f793990d20f8f640097e28556886ba5362f0 (diff)
parent410550665601a8abe8935f7b55d5732fe4c4224f (diff)
downloadrust-a7a6f013a20fbdf21d77e8ed16f0d8c7b70a7899.tar.gz
rust-a7a6f013a20fbdf21d77e8ed16f0d8c7b70a7899.zip
Rollup merge of #78641 - the8472:buffered-copy, r=sfackler
Let io::copy reuse BufWriter buffers

This optimization will allow users to implicitly set the buffer size for io::copy by wrapping the writer into a `BufWriter` if the default block size is insufficient, which should fix #49921

Due to min_specialization limitations this approach only works with `BufWriter` but not for `BufReader<R>` since `R` is unconstrained and thus the necessary specialization on `R: Read` is not always applicable. Once specialization becomes more powerful this optimization could be extended to look at the reader and writer side and use whichever buffer is larger.
Diffstat (limited to 'compiler/rustc_errors/src/snippet.rs')
0 files changed, 0 insertions, 0 deletions