From a5dbfdaf4f62a86823be8cf59952a23afb3f1d4e Mon Sep 17 00:00:00 2001 From: occheung Date: Fri, 18 Sep 2020 12:24:27 +0800 Subject: [PATCH] mqtt_mux: remove excessive paranthesis --- src/mqtt_mux.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mqtt_mux.rs b/src/mqtt_mux.rs index 95c41ae..ce4a170 100644 --- a/src/mqtt_mux.rs +++ b/src/mqtt_mux.rs @@ -150,7 +150,7 @@ impl MqttMux where SPI: Transfer { let division = u8::from_str_radix(core::str::from_utf8(message).unwrap(), 10) .map_or_else( |_| Err(Error::MqttCommandError), - |div| if (div == 1 || div == 2 || div == 4) { + |div| if div == 1 || div == 2 || div == 4 { Ok(div) } else { Err(Error::MqttCommandError) @@ -185,6 +185,8 @@ impl MqttMux where SPI: Transfer { } // TODO: Implement this + // Only need to sort the command enum + // Obviously. This is what a MUX does fn execute(&mut self, command_type: MqttCommandType) -> Result<(), Error> { info!("{:?}", command_type); match command_type {