From 96339ff7e6994e9bd27dddcadaa1e2111f9f6f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Harabie=C5=84?= Date: Sat, 8 Dec 2018 23:45:31 +0100 Subject: [PATCH] fix: use write_all in serialize method for FS Info sector --- src/fs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fs.rs b/src/fs.rs index 272c920..9639a85 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -155,12 +155,12 @@ impl FsInfoSector { fn serialize(&self, wrt: &mut T) -> io::Result<()> { wrt.write_u32::(Self::LEAD_SIG)?; let reserved = [0u8; 480]; - wrt.write(&reserved)?; + wrt.write_all(&reserved)?; wrt.write_u32::(Self::STRUC_SIG)?; wrt.write_u32::(self.free_cluster_count.unwrap_or(0xFFFFFFFF))?; wrt.write_u32::(self.next_free_cluster.unwrap_or(0xFFFFFFFF))?; let reserved2 = [0u8; 12]; - wrt.write(&reserved2)?; + wrt.write_all(&reserved2)?; wrt.write_u32::(Self::TRAIL_SIG)?; Ok(()) }