diff --git a/src/config/mod.rs b/src/config/mod.rs index fce23ac..c2fbeb3 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -10,7 +10,6 @@ use crate::error::*; pub mod cli; pub mod packages; use cli::Cli; -use packages::*; pub trait YamlConfigSection: Debug + Clone + for<'a> Deserialize<'a> { fn check(&self) -> Result<()>; @@ -65,7 +64,7 @@ impl Pass { self.check()?; Ok(match self { Self::Text(pass) => pass.clone(), - Self::Env(key) => std::env::var(key).map_err(|err| ConfigError::from(err))?, + Self::Env(key) => std::env::var(key).map_err(ConfigError::from)?, Self::File(file) => std::fs::read_to_string(file)?, }) } @@ -75,10 +74,7 @@ impl YamlConfigSection for Pass { match self { Self::Text(_) => (), Self::Env(envvar) => { - if !std::env::var(envvar) - .map_err(ConfigError::from)? - .is_empty() - { + if !std::env::var(envvar).map_err(ConfigError::from)?.is_empty() { } else { return Err(ConfigError::EnvNotSet(envvar.clone()).into()); } diff --git a/src/config/packages.rs b/src/config/packages.rs index bcbf9b6..19db680 100644 --- a/src/config/packages.rs +++ b/src/config/packages.rs @@ -1,3 +1,3 @@ pub enum PackageType { - Cargo + Cargo, } diff --git a/src/release/mod.rs b/src/release/mod.rs index 9c8eee9..2aac8c4 100644 --- a/src/release/mod.rs +++ b/src/release/mod.rs @@ -22,6 +22,6 @@ pub async fn release(cfg: &Config, apis: &mut ApiCollection) -> Result<()> { Ok(()) } -async fn tag(cfg: &Config) -> Result<()> { +async fn tag(_cfg: &Config) -> Result<()> { todo!() }