diff --git a/src/main.rs b/src/main.rs index 61d6dc1..1383668 100644 --- a/src/main.rs +++ b/src/main.rs @@ -261,7 +261,7 @@ impl ExecutorFactory, SecretImpl>> for C for (k, v) in app.env.iter() { dictionary.insert(k.to_string(), v.to_string()); } - let mut secret_impl = SecretImpl::new(); + let mut secret_impl = SecretImpl::default(); for s in app.secrets.iter() { if let Some(value) = s.secret_values.first() { secret_impl.insert(s.name.to_string(), value.value.to_string()); diff --git a/src/secret.rs b/src/secret.rs index 795e30b..2ddcf89 100644 --- a/src/secret.rs +++ b/src/secret.rs @@ -2,7 +2,7 @@ use secret::SecretStrategy; use std::collections::HashMap; use std::ops::{Deref, DerefMut}; -#[derive(Clone)] +#[derive(Clone, Default)] pub struct SecretImpl { inner: HashMap, } @@ -13,22 +13,6 @@ impl SecretStrategy for SecretImpl { } } -impl Default for SecretImpl { - fn default() -> Self { - Self { - inner: Default::default(), - } - } -} - -impl SecretImpl { - pub fn new() -> Self { - Self { - inner: Default::default(), - } - } -} - impl Deref for SecretImpl { type Target = HashMap;