no flush before copy all

This commit is contained in:
Y. T. Chung
2017-02-06 15:56:55 +08:00
parent c05d05b495
commit b41f2167df

View File

@@ -238,7 +238,7 @@ impl<R, W> Future for CopyExactEncrypted<R, W>
// If our buffer has some data, let's write it out!
while *pos < *cap {
let i = try_nb!(writer.write(&enc_buf[*pos..*cap]).and_then(|x| writer.flush().map(|_| x)));
let i = try_nb!(writer.write(&enc_buf[*pos..*cap]));
*pos += i;
}