From 977ae5e3e46b5b3ffe06b53d58147338f74f9473 Mon Sep 17 00:00:00 2001 From: soypat Date: Sun, 20 Aug 2023 20:01:47 -0300 Subject: [PATCH] don't pay for what you don't use --- cyw43/src/bus.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyw43/src/bus.rs b/cyw43/src/bus.rs index e26f1112..0b5632cf 100644 --- a/cyw43/src/bus.rs +++ b/cyw43/src/bus.rs @@ -102,7 +102,7 @@ where cmd_buf[0] = cmd; cmd_buf[1..][..buf.len()].copy_from_slice(buf); - self.status = self.spi.cmd_write(&cmd_buf).await; + self.status = self.spi.cmd_write(&cmd_buf[..buf.len() + 1]).await; } #[allow(unused)]