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

Reformat with rustfmt 1.4.8-stable (afb1ee1 2019-09-08) #258

Merged
merged 1 commit into from Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

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