common: Silence compiler warnings about ignored Result return values.
authorTilman Sauerbeck <tilman@code-monkey.de>
Thu, 9 Jan 2020 20:19:57 +0000 (21:19 +0100)
committerTilman Sauerbeck <tilman@code-monkey.de>
Thu, 9 Jan 2020 20:19:57 +0000 (21:19 +0100)
Note that we still don't handle potential errors from Storage::write().

src/common/logger.rs

index 029cc9a473466f52b346762b3568e8eda4e1a514..824e26ca10b2025e6cd906804a8109897922354d 100644 (file)
@@ -430,8 +430,10 @@ impl<'a> Logger<'a> {
 
         let this_sector = self.first_sector + self.sectors_written;
 
-        self.storage.write(this_sector as usize * SECTOR_SIZE,
-                           &self.write_buffer);
+        if self.storage.write(this_sector as usize * SECTOR_SIZE,
+                              &self.write_buffer).is_err() {
+            // XXX
+        }
 
         self.sectors_written += 1;
 
@@ -553,8 +555,10 @@ impl<'a> Logger<'a> {
             // our buffer with 0xff, so we don't need to do anything here.
             let this_sector = self.first_sector + self.sectors_written;
 
-            self.storage.write(this_sector as usize * SECTOR_SIZE,
-                               &self.write_buffer);
+            if self.storage.write(this_sector as usize * SECTOR_SIZE,
+                                  &self.write_buffer).is_err() {
+                // XXX
+            }
 
             self.sectors_written += 1;