Add TODO comments about unwanted copies.

This commit is contained in:
Nick Mathewson 2022-08-01 12:40:13 -04:00
parent cba0f40aa4
commit 50b42b50df
1 changed files with 2 additions and 0 deletions

View File

@ -60,6 +60,7 @@ pub mod aes {
&mut self,
mut buf: InOutBuf<'_, '_, u8>,
) -> Result<(), StreamCipherError> {
// TODO(nickm): It would be lovely if we could get rid of this copy somehow.
let in_buf = buf.get_in().to_vec();
self.0
.update(&in_buf, buf.get_out())
@ -106,6 +107,7 @@ pub mod aes {
&mut self,
mut buf: InOutBuf<'_, '_, u8>,
) -> Result<(), StreamCipherError> {
// TODO(nickm): It would be lovely if we could get rid of this copy.
let in_buf = buf.get_in().to_vec();
self.0
.update(&in_buf, buf.get_out())