From: Tilman Sauerbeck Date: Thu, 9 Jan 2020 20:19:57 +0000 (+0100) Subject: common: Silence compiler warnings about ignored Result return values. X-Git-Url: http://git.code-monkey.de/?a=commitdiff_plain;h=946cce9fdf4094ca5b3e2dd764a44e68cd3bf3a6;p=gps-watch.git common: Silence compiler warnings about ignored Result return values. Note that we still don't handle potential errors from Storage::write(). --- diff --git a/src/common/logger.rs b/src/common/logger.rs index 029cc9a..824e26c 100644 --- a/src/common/logger.rs +++ b/src/common/logger.rs @@ -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;