From 71cc22f11bdb66c8664d8dbeca55278d818677c7 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Thu, 4 Apr 2024 12:04:50 +0200 Subject: [PATCH] Fix Trussed imports --- Cargo.toml | 1 + src/admin.rs | 3 ++- src/config.rs | 5 +++-- src/lib.rs | 8 ++++---- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b4eff52..d89c289 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,7 @@ apdu-dispatch = "0.1" cbor-smol = "0.4.0" ctaphid-dispatch = "0.1" delog = "0.1" +heapless = "0.7" iso7816 = "0.1" littlefs2 = "0.4" serde = { version = "1.0.180", default-features = false } diff --git a/src/admin.rs b/src/admin.rs index 0300ab8..b5744ff 100644 --- a/src/admin.rs +++ b/src/admin.rs @@ -5,10 +5,11 @@ use cbor_smol::cbor_deserialize; use core::{convert::TryInto, marker::PhantomData, time::Duration}; use ctaphid_dispatch::app::{self as hid, Command as HidCommand, Message}; use ctaphid_dispatch::command::VendorCommand; +use heapless::Vec; #[cfg(feature = "factory-reset")] use littlefs2::path::PathBuf; use serde::Deserialize; -use trussed::{interrupt::InterruptFlag, store::filestore::Filestore, syscall, types::Vec}; +use trussed::{interrupt::InterruptFlag, store::filestore::Filestore, syscall}; use crate::config::{self, Config, ConfigError}; diff --git a/src/config.rs b/src/config.rs index 13fde86..c2e39ad 100644 --- a/src/config.rs +++ b/src/config.rs @@ -5,14 +5,15 @@ use core::{ }; use cbor_smol::{cbor_deserialize, cbor_serialize_bytes}; +use heapless::Vec; use littlefs2::{path, path::Path}; use serde::{de::DeserializeOwned, Serialize}; use strum_macros::FromRepr; use trussed::{ + client::Client, store::filestore::Filestore, try_syscall, - types::{Location, Message, Vec}, - Client, + types::{Location, Message}, }; #[derive(Debug)] diff --git a/src/lib.rs b/src/lib.rs index a2e9315..e764ccd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,14 +20,14 @@ use trussed_manage::ManageClient; use trussed_se050_manage::Se050ManageClient; #[cfg(not(feature = "se050"))] -pub trait Client: trussed::Client + ManageClient {} +pub trait Client: trussed::client::Client + ManageClient {} #[cfg(not(feature = "se050"))] -impl Client for C {} +impl Client for C {} #[cfg(feature = "se050")] pub trait Client: - trussed::Client + Se050ManageClient + ManageClient + trussed::client::Client + Se050ManageClient + ManageClient { } #[cfg(feature = "se050")] -impl Client for C {} +impl Client for C {}