Compare commits

..

No commits in common. "e6f392bd7a91ffe3f0b080627e915ea458eade5a" and "00683722d64a9c2f619e6c5378ab7b571b32ecc8" have entirely different histories.

View File

@ -23,11 +23,11 @@ impl Node {
/// Write out a single file within the tar to a file or something with a
/// ``std::io::Write`` trait.
pub fn write<T: io::Write>(&self, mut input: T) -> Result<usize, Error> {
pub fn write<T: io::Write>(self, mut input: T) -> Result<usize, Error> {
input.write_all(&self.header.to_bytes()?)?;
let mut written = 512;
for d in &self.data {
input.write_all(d)?;
for d in self.data {
input.write_all(&d)?;
written += d.len();
}