From 252a7ba10d52cf15019395ec41e5971418e7b423 Mon Sep 17 00:00:00 2001 From: "Patrick J.P. Culp" Date: Thu, 23 Feb 2023 22:11:33 +0000 Subject: [PATCH] tough: add Send and Sync to Repository transport --- tough/src/lib.rs | 6 +++--- tough/tests/http.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tough/src/lib.rs b/tough/src/lib.rs index c27bb163..8df907e9 100644 --- a/tough/src/lib.rs +++ b/tough/src/lib.rs @@ -162,7 +162,7 @@ where root: R, metadata_base_url: Url, targets_base_url: Url, - transport: Option>, + transport: Option>, limits: Option, datastore: Option, expiration_enforcement: Option, @@ -197,7 +197,7 @@ impl RepositoryLoader { /// Set the transport. If no transport has been set, [`DefaultTransport`] will be used. #[must_use] - pub fn transport(mut self, transport: T) -> Self { + pub fn transport(mut self, transport: T) -> Self { self.transport = Some(Box::new(transport)); self } @@ -295,7 +295,7 @@ pub enum Prefix { /// You can create a `Repository` using a [`RepositoryLoader`]. #[derive(Debug, Clone)] pub struct Repository { - transport: Box, + transport: Box, consistent_snapshot: bool, datastore: Datastore, earliest_expiration: DateTime, diff --git a/tough/tests/http.rs b/tough/tests/http.rs index a660e512..900e6e8c 100644 --- a/tough/tests/http.rs +++ b/tough/tests/http.rs @@ -45,7 +45,7 @@ mod http_happy { run_http_test(DefaultTransport::default()); } - fn run_http_test(transport: T) { + fn run_http_test(transport: T) { let server = Server::run(); let repo_dir = test_data().join("tuf-reference-impl"); server.expect(create_successful_get("metadata/timestamp.json"));