diff --git a/src/git.rs b/src/git.rs index 07f454c85a9..4a5a6c7f015 100644 --- a/src/git.rs +++ b/src/git.rs @@ -37,6 +37,7 @@ pub struct Dependency { pub kind: Option, #[serde(skip_serializing_if = "Option::is_none")] pub package: Option, + pub public: bool, } pub struct Repository { diff --git a/src/models/dependency.rs b/src/models/dependency.rs index 10b43576a54..38efaca14b9 100644 --- a/src/models/dependency.rs +++ b/src/models/dependency.rs @@ -119,6 +119,7 @@ pub fn add_dependencies( target: dep.target.clone(), kind: dep.kind.or(Some(DependencyKind::Normal)), package, + public: dep.public.unwrap_or(false) }, ( version_id.eq(target_version_id), diff --git a/src/tests/builders.rs b/src/tests/builders.rs index 6dac66c995d..33fa697e636 100644 --- a/src/tests/builders.rs +++ b/src/tests/builders.rs @@ -588,6 +588,7 @@ impl DependencyBuilder { kind: None, explicit_name_in_toml: self.explicit_name_in_toml, registry: self.registry, + public: Some(false), } } } diff --git a/src/views/krate_publish.rs b/src/views/krate_publish.rs index 0fb3c496ce9..8a44cd53241 100644 --- a/src/views/krate_publish.rs +++ b/src/views/krate_publish.rs @@ -64,6 +64,7 @@ pub struct EncodableCrateDependency { pub kind: Option, pub explicit_name_in_toml: Option, pub registry: Option, + pub public: Option, } impl<'de> Deserialize<'de> for EncodableCrateName {