From bf32dc5d3acee1f73fe445976bde474ffa6d04e0 Mon Sep 17 00:00:00 2001 From: goueslati Date: Mon, 12 Jun 2023 15:07:46 +0100 Subject: [PATCH] clippy --- embassy-stm32-wpan/src/ble.rs | 4 ++-- embassy-stm32-wpan/src/shci.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/embassy-stm32-wpan/src/ble.rs b/embassy-stm32-wpan/src/ble.rs index 4546bde07..19955a8a3 100644 --- a/embassy-stm32-wpan/src/ble.rs +++ b/embassy-stm32-wpan/src/ble.rs @@ -63,7 +63,7 @@ impl Ble { core::ptr::copy(buf.as_ptr(), pcmd_serial_buf, buf.len()); - let mut cmd_packet = &mut *(*TL_REF_TABLE.assume_init().ble_table).pcmd_buffer; + let cmd_packet = &mut *(*TL_REF_TABLE.assume_init().ble_table).pcmd_buffer; cmd_packet.cmdserial.ty = TlPacketType::BleCmd as u8; } @@ -72,7 +72,7 @@ impl Ble { #[allow(dead_code)] // Not used currently but reserved pub(super) fn ble_send_acl_data() { - let mut cmd_packet = unsafe { &mut *(*TL_REF_TABLE.assume_init().ble_table).phci_acl_data_buffer }; + let cmd_packet = unsafe { &mut *(*TL_REF_TABLE.assume_init().ble_table).phci_acl_data_buffer }; cmd_packet.acl_data_serial.ty = TlPacketType::AclData as u8; diff --git a/embassy-stm32-wpan/src/shci.rs b/embassy-stm32-wpan/src/shci.rs index 4f4d08886..8537995ff 100644 --- a/embassy-stm32-wpan/src/shci.rs +++ b/embassy-stm32-wpan/src/shci.rs @@ -90,7 +90,7 @@ pub fn shci_ble_init(param: ShciBleInitCmdParam) { (*cmd_ptr).cmdserial.cmd.cmd_code = SCHI_OPCODE_BLE_INIT; (*cmd_ptr).cmdserial.cmd.payload_len = core::mem::size_of::() as u8; - let mut p_cmd_buffer = &mut *(*TL_SYS_TABLE.as_mut_ptr()).pcmd_buffer; + let p_cmd_buffer = &mut *(*TL_SYS_TABLE.as_mut_ptr()).pcmd_buffer; core::ptr::write(p_cmd_buffer, *cmd_ptr); p_cmd_buffer.cmdserial.ty = TlPacketType::SysCmd as u8;