Skip to content

Commit

Permalink
simplify DockerTestRunner type signature
Browse files Browse the repository at this point in the history
  • Loading branch information
VendettaReborn committed Mar 19, 2024
1 parent 90a5b6e commit 4a692b9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions clash_lib/src/proxy/utils/test_utils/docker_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@ pub struct DockerTestRunner {
}

impl DockerTestRunner {
pub async fn new<
'a,
T1: serde::ser::Serialize + Into<std::string::String> + std::fmt::Debug + Clone,
Z: Into<String> + std::hash::Hash + Eq + serde::Serialize,
>(
image_conf: Option<CreateImageOptions<'a, T1>>,
container_conf: Config<Z>,
pub async fn new<'a>(
image_conf: Option<CreateImageOptions<'a, String>>,
container_conf: Config<String>,
) -> Result<Self> {
let docker: Docker = Docker::connect_with_socket_defaults()?;

Expand All @@ -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::<String>(&id, None).await?;
Expand Down

0 comments on commit 4a692b9

Please sign in to comment.