Skip to content

Commit

Permalink
Add #[serde(default)] to optional fields
Browse files Browse the repository at this point in the history
  • Loading branch information
N3xed committed Aug 6, 2023
1 parent 403069a commit e367e07
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build/native/cargo_driver/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,15 +410,18 @@ pub struct RemoteComponent {
pub version: String,
/// An optional git url that contains this remote component. Corresponds to the `git`
/// field of the `idf_component.yml`.
#[serde(default)]
pub git: Option<String>,
/// An optional path to the component in case [`RemoteComponent::git`] is used.
/// Corresponds to the `path` field of the `idf_component.yml`.
///
/// Note: This should not be used for local components, use
/// [`ExtraComponent::component_dirs`] instead.
#[serde(default)]
pub path: Option<String>,
/// An optional url to a custom component registry. Corresponds to the `service_url`
/// field of the `idf_component.yml`.
#[serde(default)]
pub service_url: Option<String>,
}

Expand Down

0 comments on commit e367e07

Please sign in to comment.