From 4fefd547d12b18bc21a4b1bafda276600a9e33e8 Mon Sep 17 00:00:00 2001 From: Vladan Popovic Date: Mon, 20 Jun 2022 00:10:20 +0200 Subject: [PATCH] remove \r\n from the end of the rx buffer may be a bad idea and should be revisited --- src/modem.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modem.rs b/src/modem.rs index e019ca0..b468232 100644 --- a/src/modem.rs +++ b/src/modem.rs @@ -121,7 +121,7 @@ impl Modem { // // This check here is tested on sim800l and works only because the modem has \r\n as CRLF. if line.ends_with("\r") { - Ok(line) + Ok(line[0..line.len()-1].to_string()) } else { Err(ModemError::ReadError)