Skip to content

Commit

Permalink
fix default option for 'skip'
Browse files Browse the repository at this point in the history
when using #[serde(default = "path")], the provided path needs to be a function, using a variant is not valid
  • Loading branch information
icewind1991 committed Mar 3, 2020
1 parent 82d372b commit ec5140f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub struct Config {
pub description: String,
#[serde(deserialize_with = "deserialize::deserialize")]
pub dirs: Vec<path::PathBuf>,
#[serde(default = Skip::None)]
#[serde(default)]
pub skip: Skip,
pub ignore_symlinks: bool,
pub ignore_hidden: bool,
Expand All @@ -41,6 +41,12 @@ pub enum Skip {
Files,
}

impl Default for Skip {
fn default() -> Self {
Skip::None
}
}

#[derive(Debug, Deserialize)]
pub struct GlobalConfig {
pub types: HashMap<String, String>,
Expand Down

0 comments on commit ec5140f

Please sign in to comment.