26 lines
839 B
Rust
26 lines
839 B
Rust
use crate::module::gitignore::GitIgnoreModuleArgs;
|
|
|
|
#[derive(Default, serde::Deserialize, serde::Serialize)]
|
|
pub struct GitIgnoreModuleConfig {
|
|
pub editors: Option<bool>,
|
|
pub env: Option<bool>,
|
|
pub direnv: Option<bool>,
|
|
pub rust: Option<bool>,
|
|
pub nodejs: Option<bool>,
|
|
pub nix: Option<bool>,
|
|
pub custom: Option<String>,
|
|
}
|
|
|
|
impl From<GitIgnoreModuleConfig> for GitIgnoreModuleArgs {
|
|
fn from(cfg: GitIgnoreModuleConfig) -> Self {
|
|
GitIgnoreModuleArgs {
|
|
editors: cfg.editors.unwrap_or_default(),
|
|
env: cfg.env.unwrap_or_default(),
|
|
direnv: cfg.direnv.unwrap_or_default(),
|
|
rust: cfg.rust.unwrap_or_default(),
|
|
nodejs: cfg.nodejs.unwrap_or_default(),
|
|
nix: cfg.nix.unwrap_or_default(),
|
|
custom: cfg.custom,
|
|
}
|
|
}
|
|
}
|