Skip to content

Commit 6249581

Browse files
committed
fix RootDicomObject::write_to_file
write preamble and magic code via write_all instead of write
1 parent 4675add commit 6249581

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

object/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ where
111111
let mut to = BufWriter::new(file);
112112

113113
// write preamble
114-
to.write(&[0_u8; 128][..])?;
114+
to.write_all(&[0_u8; 128][..])?;
115115

116116
// write magic sequence
117-
to.write(b"DICM")?;
117+
to.write_all(b"DICM")?;
118118

119119
// write meta group
120120
self.meta.write(&mut to)?;

0 commit comments

Comments
 (0)