Skip to content

Commit

Permalink
Merge pull request #258 from erickt/fmt
Browse files Browse the repository at this point in the history
Reformat with rustfmt 1.4.8-stable (afb1ee1 2019-09-08)
  • Loading branch information
erickt committed Dec 11, 2019
2 parents dab6f37 + 0e1b35f commit 4665df1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
16 changes: 4 additions & 12 deletions src/client.rs
Expand Up @@ -226,11 +226,7 @@ where
/// # })
/// # }
/// ```
pub async fn with_trusted_local(
config: Config<T>,
local: L,
remote: R,
) -> Result<Self> {
pub async fn with_trusted_local(config: Config<T>, local: L, remote: R) -> Result<Self> {
let root_path = MetadataPath::from_role(&Role::Root);

// FIXME should this be MetadataVersion::None so we bootstrap with the latest version?
Expand Down Expand Up @@ -513,7 +509,8 @@ where

// FIXME(#253) verify the trusted root version matches the provided version.

let tuf = Tuf::from_root_with_trusted_keys(root.clone(), root_threshold, trusted_root_keys)?;
let tuf =
Tuf::from_root_with_trusted_keys(root.clone(), root_threshold, trusted_root_keys)?;

let mut client = Client {
tuf,
Expand Down Expand Up @@ -1185,12 +1182,7 @@ mod test {
let public_key = private_key.public().clone();

assert_matches!(
Client::with_trusted_local(
Config::default(),
&local,
&remote,
)
.await,
Client::with_trusted_local(Config::default(), &local, &remote,).await,
Err(Error::NotFound)
);

Expand Down
2 changes: 1 addition & 1 deletion tests/integration.rs
@@ -1,11 +1,11 @@
use maplit::hashmap;
use std::iter::once;
use tuf::crypto::{HashAlgorithm, PrivateKey, SignatureScheme};
use tuf::interchange::Json;
use tuf::metadata::{
Delegation, Delegations, MetadataDescription, MetadataPath, RootMetadataBuilder,
SnapshotMetadataBuilder, TargetsMetadataBuilder, TimestampMetadataBuilder, VirtualTargetPath,
};
use std::iter::once;
use tuf::Tuf;

const ED25519_1_PK8: &'static [u8] = include_bytes!("./ed25519/ed25519-1.pk8.der");
Expand Down

0 comments on commit 4665df1

Please sign in to comment.