The current drop implementation for Entry is as follows:
impl<'a, R: 'a + Read> Drop for Entry<'a, R> {
fn drop(&mut self) {
if self.position < self.length {
// Consume the rest of the data in this entry.
let mut remaining = self.reader.take(self.length - self.position);
let _ = io::copy(&mut remaining, &mut io::sink());
}
}
}
When dealing with large entries, this function can take a very long time. Could there be a reason for this implementation? Do we really need to consume the reader?
The current drop implementation for
Entryis as follows:When dealing with large entries, this function can take a very long time. Could there be a reason for this implementation? Do we really need to consume the reader?