From 593eb2c1f15da75994fd29d6e1d0325583365054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sosth=C3=A8ne=20Gu=C3=A9don?= Date: Thu, 4 Sep 2025 17:21:06 +0200 Subject: [PATCH] Update to heapless 0.9 --- Cargo.toml | 7 ++++++- src/pipe.rs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e0032fd..26353e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ categories = ["embedded", "no-std"] ctaphid-dispatch = "0.3" embedded-time = "0.12" delog = "0.1.0" -heapless-bytes = "0.3" +heapless-bytes = "0.5" interchange = "0.3.0" serde = { version = "1.0", default-features = false } usb-device = "0.2.3" @@ -31,3 +31,8 @@ log-info = [] log-debug = [] log-warn = [] log-error = [] + +[patch.crates-io] +ctaphid-dispatch = { git = "https://github.com/trussed-dev/ctaphid-dispatch.git", rev = "edc5d69eeb71e6718c60aad54574f6c3b824309c" } +ctaphid-app = { git = "https://github.com/trussed-dev/ctaphid-dispatch.git", rev = "edc5d69eeb71e6718c60aad54574f6c3b824309c" } +trussed-core = { git = "https://github.com/trussed-dev/trussed.git", rev = "1e7b09a983dc8ae64a7ad8401ce541a9a77e5939"} diff --git a/src/pipe.rs b/src/pipe.rs index e36393f..fab5147 100644 --- a/src/pipe.rs +++ b/src/pipe.rs @@ -528,7 +528,7 @@ impl<'alloc, 'pipe, 'interrupt, Bus: UsbBus, const N: usize> } match self.interchange.request(( request.command, - Bytes::from_slice(&self.buffer[..request.length as usize]).unwrap(), + Bytes::try_from(&self.buffer[..request.length as usize]).unwrap(), )) { Ok(_) => { self.state = State::WaitingOnAuthenticator(request);