From d7f7614b225da41477972b5fd287d10e6069846c Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Wed, 28 Sep 2022 11:32:11 +0200 Subject: [PATCH] Remove subghz static lifetime requirement --- embassy-lora/src/stm32wl/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/embassy-lora/src/stm32wl/mod.rs b/embassy-lora/src/stm32wl/mod.rs index e28fa2c1..8d5d1953 100644 --- a/embassy-lora/src/stm32wl/mod.rs +++ b/embassy-lora/src/stm32wl/mod.rs @@ -234,15 +234,15 @@ fn configure_radio(radio: &mut SubGhz<'_, NoDma, NoDma>, config: SubGhzRadioConf Ok(()) } -impl PhyRxTx for SubGhzRadio<'static, RS> { +impl<'d, RS: RadioSwitch> PhyRxTx for SubGhzRadio<'d, RS> { type PhyError = RadioError; - type TxFuture<'m> = impl Future> + 'm where RS: 'm; + type TxFuture<'m> = impl Future> + 'm where Self: 'm; fn tx<'m>(&'m mut self, config: TxConfig, buf: &'m [u8]) -> Self::TxFuture<'m> { async move { self.do_tx(config, buf).await } } - type RxFuture<'m> = impl Future> + 'm where RS: 'm; + type RxFuture<'m> = impl Future> + 'm where Self: 'm; fn rx<'m>(&'m mut self, config: RfConfig, buf: &'m mut [u8]) -> Self::RxFuture<'m> { async move { self.do_rx(config, buf).await } }