From 58a8ce18b9db5b4199455da3b4d11be09e32fd7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Israel=20Pe=C3=B1a?= Date: Sun, 28 Jul 2024 12:56:15 -0700 Subject: [PATCH] Fix format, imports --- testcontainers/src/core/client.rs | 25 ++++++++++--------- .../src/core/client/bollard_client.rs | 6 ++--- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/testcontainers/src/core/client.rs b/testcontainers/src/core/client.rs index c946deab..4efc2ce4 100644 --- a/testcontainers/src/core/client.rs +++ b/testcontainers/src/core/client.rs @@ -1,13 +1,5 @@ -use crate::core::{ - client::exec::ExecResult, - env, - env::ConfigurationError, - logs::{ - stream::{LogStream, RawLogStream}, - LogFrame, LogSource, WaitingStreamWrapper, - }, - ports::{PortMappingError, Ports}, -}; +use std::{io, str::FromStr}; + use bollard::{ auth::DockerCredentials, container::{Config, CreateContainerOptions, LogOutput, LogsOptions, RemoveContainerOptions}, @@ -19,11 +11,20 @@ use bollard::{ }; use bollard_stubs::models::{ContainerInspectResponse, ExecInspectResponse, Network}; use futures::{StreamExt, TryStreamExt}; -use std::io; -use std::str::FromStr; use tokio::sync::OnceCell; use url::Url; +use crate::core::{ + client::exec::ExecResult, + env, + env::ConfigurationError, + logs::{ + stream::{LogStream, RawLogStream}, + LogFrame, LogSource, WaitingStreamWrapper, + }, + ports::{PortMappingError, Ports}, +}; + mod bollard_client; mod exec; mod factory; diff --git a/testcontainers/src/core/client/bollard_client.rs b/testcontainers/src/core/client/bollard_client.rs index 5b0549fb..e185c4cc 100644 --- a/testcontainers/src/core/client/bollard_client.rs +++ b/testcontainers/src/core/client/bollard_client.rs @@ -1,10 +1,10 @@ -use std::str::FromStr; -use std::time::Duration; +use std::{str::FromStr, time::Duration}; -use crate::core::env; use bollard::{Docker, API_DEFAULT_VERSION}; use url::Url; +use crate::core::env; + const DEFAULT_TIMEOUT: Duration = Duration::from_secs(2 * 60); pub(super) fn init(config: &env::Config) -> Result {