diff --git a/nrf52840/src/at_utils.rs b/nrf52840/src/at_utils.rs index e5fb07b..94138d3 100644 --- a/nrf52840/src/at_utils.rs +++ b/nrf52840/src/at_utils.rs @@ -39,7 +39,7 @@ impl defmt::Format for FromModem { } } -fn pick_values<'a>(mut values: &'a str, indices: &[usize]) -> Vec, 3> { +fn pick_values(mut values: &str, indices: &[usize]) -> Vec, 3> { let mut split: Vec<&str, 15> = Vec::new(); while !values.is_empty() { let pos = match values.chars().next() { @@ -61,7 +61,7 @@ fn pick_values<'a>(mut values: &'a str, indices: &[usize]) -> Vec bool) { "OK" => Ok(FromModem::Ok), "ERROR" => Err(Error::AtError), line => String::from_str(line) - .map(|l| FromModem::Line(l)) + .map(FromModem::Line) .map_err(|_| Error::StringEncodingError), }; if let Ok(FromModem::Line(_)) = to_send.as_ref() {