Skip to content

Commit

Permalink
Fix Trussed imports
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-nitrokey committed Apr 4, 2024
1 parent 0ba0e76 commit 71cc22f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
3 changes: 2 additions & 1 deletion src/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down
5 changes: 3 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<C: trussed::Client + ManageClient> Client for C {}
impl<C: trussed::client::Client + ManageClient> Client for C {}

#[cfg(feature = "se050")]
pub trait Client:
trussed::Client + Se050ManageClient + ManageClient
trussed::client::Client + Se050ManageClient + ManageClient
{
}
#[cfg(feature = "se050")]
impl<C: trussed::Client + Se050ManageClient + ManageClient> Client for C {}
impl<C: trussed::client::Client + Se050ManageClient + ManageClient> Client for C {}

0 comments on commit 71cc22f

Please sign in to comment.