chore: Remove feature flags
This commit is contained in:
parent
33bebb5e29
commit
f67dea41a3
23 changed files with 69 additions and 305 deletions
|
|
@ -22,10 +22,5 @@ serde_yaml.workspace = true
|
|||
serde_json.workspace = true
|
||||
bon.workspace = true
|
||||
|
||||
[features]
|
||||
default = []
|
||||
stages = []
|
||||
copy = []
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
|||
|
|
@ -69,21 +69,12 @@ impl<'a> ModuleRequiredFields<'a> {
|
|||
}
|
||||
|
||||
#[must_use]
|
||||
#[allow(clippy::missing_const_for_fn)]
|
||||
pub fn get_copy_args(&'a self) -> Option<(Option<&'a str>, &'a str, &'a str)> {
|
||||
#[cfg(feature = "copy")]
|
||||
{
|
||||
Some((
|
||||
self.config.get("from").and_then(|from| from.as_str()),
|
||||
self.config.get("src")?.as_str()?,
|
||||
self.config.get("dest")?.as_str()?,
|
||||
))
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "copy"))]
|
||||
{
|
||||
None
|
||||
}
|
||||
Some((
|
||||
self.config.get("from").and_then(|from| from.as_str()),
|
||||
self.config.get("src")?.as_str()?,
|
||||
self.config.get("dest")?.as_str()?,
|
||||
))
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
|
|
|
|||
|
|
@ -101,16 +101,10 @@ impl Recipe<'_> {
|
|||
|
||||
recipe.modules_ext.modules = Module::get_modules(&recipe.modules_ext.modules, None)?;
|
||||
|
||||
#[cfg(feature = "stages")]
|
||||
if let Some(ref mut stages_ext) = recipe.stages_ext {
|
||||
stages_ext.stages = crate::Stage::get_stages(&stages_ext.stages, None)?;
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "stages"))]
|
||||
{
|
||||
recipe.stages_ext = None;
|
||||
}
|
||||
|
||||
Ok(recipe)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue