From 4a692b9fa178e9772983216934c5c28044148cf9 Mon Sep 17 00:00:00 2001 From: VendettaReborn Date: Tue, 19 Mar 2024 11:37:57 +0800 Subject: [PATCH] simplify DockerTestRunner type signature --- .../src/proxy/utils/test_utils/docker_runner.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/clash_lib/src/proxy/utils/test_utils/docker_runner.rs b/clash_lib/src/proxy/utils/test_utils/docker_runner.rs index 4f117e4c6..f0efba5b1 100644 --- a/clash_lib/src/proxy/utils/test_utils/docker_runner.rs +++ b/clash_lib/src/proxy/utils/test_utils/docker_runner.rs @@ -18,13 +18,9 @@ pub struct DockerTestRunner { } impl DockerTestRunner { - pub async fn new< - 'a, - T1: serde::ser::Serialize + Into + std::fmt::Debug + Clone, - Z: Into + std::hash::Hash + Eq + serde::Serialize, - >( - image_conf: Option>, - container_conf: Config, + pub async fn new<'a>( + image_conf: Option>, + container_conf: Config, ) -> Result { let docker: Docker = Docker::connect_with_socket_defaults()?; @@ -34,7 +30,7 @@ impl DockerTestRunner { .await?; let id = docker - .create_container::<&str, Z>(None, container_conf) + .create_container::<&str, String>(None, container_conf) .await? .id; docker.start_container::(&id, None).await?;