From 241bb4a594d6715749f9eb7c23e64297c9cfc908 Mon Sep 17 00:00:00 2001 From: Artem Medvedev Date: Thu, 28 Sep 2023 11:39:39 +0200 Subject: [PATCH] style: derive `Default` to fix clippy lint --- testcontainers/src/core/env.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/testcontainers/src/core/env.rs b/testcontainers/src/core/env.rs index 85e10b2c..5626a430 100644 --- a/testcontainers/src/core/env.rs +++ b/testcontainers/src/core/env.rs @@ -32,9 +32,10 @@ impl GetEnvValue for Os { } /// The commands available to the `TESTCONTAINERS` env variable. -#[derive(Debug, PartialEq, Eq, Clone, Copy)] +#[derive(Debug, Default, PartialEq, Eq, Clone, Copy)] pub enum Command { Keep, + #[default] Remove, } @@ -50,12 +51,6 @@ impl FromStr for Command { } } -impl Default for Command { - fn default() -> Self { - Command::Remove - } -} - #[cfg(test)] mod tests { use super::*;