Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Trussed imports #24

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 {}