Skip to content

Commit

Permalink
Merge pull request #282 from gui1117/gui-fix-default-features
Browse files Browse the repository at this point in the history
Fix default features in dependency
  • Loading branch information
dtolnay authored Jul 29, 2024
2 parents daeef9c + c08e3f7 commit aa567ec
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/dependencies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,7 @@ pub(crate) struct Dependency {
pub path: Option<Directory>,
#[serde(default, skip_serializing_if = "is_false")]
pub optional: bool,
#[serde(
rename = "default-features",
default = "get_true",
skip_serializing_if = "is_true"
)]
#[serde(rename = "default-features", default = "get_true")]
pub default_features: bool,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub features: Vec<String>,
Expand Down Expand Up @@ -195,10 +191,6 @@ fn get_true() -> bool {
true
}

fn is_true(boolean: &bool) -> bool {
*boolean
}

fn is_false(boolean: &bool) -> bool {
!*boolean
}
Expand Down

0 comments on commit aa567ec

Please sign in to comment.