Compare commits
2 Commits
00683722d6
...
e6f392bd7a
Author | SHA1 | Date | |
---|---|---|---|
e6f392bd7a | |||
e0f497cb89 |
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user