From 8ff6642aa76742ace0f97d53301791e68072dc8a Mon Sep 17 00:00:00 2001 From: LongHairedHacker Date: Thu, 24 Dec 2020 00:12:53 +0100 Subject: [PATCH] Worked around some of the error checking warnings --- src/max6675.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/max6675.rs b/src/max6675.rs index d09227a..093fb04 100644 --- a/src/max6675.rs +++ b/src/max6675.rs @@ -8,9 +8,9 @@ where { let mut buffer = [0u8, 0u8]; - nss_pin.set_low(); + nss_pin.set_low().map_err(|_| "Unable to set pin low")?; let res = spi.transfer(&mut buffer); - nss_pin.set_high(); + nss_pin.set_high().map_err(|_| "Unable to set pin high")?; let raw_result = match res { Ok(value) => (value[0] as u16) << 8 | (value[1] as u16),