Skip to content

Commit

Permalink
修复无created_by导致报错的问题 (#48)
Browse files Browse the repository at this point in the history
* 修复无created_by导致报错的问题
  • Loading branch information
jelipo authored Jul 17, 2024
1 parent 90c4c85 commit ac45b86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/container/docker/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ pub struct Rootfs {
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct History {
pub created: String,
pub created: Option<String>,
#[serde(rename = "created_by")]
pub created_by: String,
pub created_by: Option<String>,
#[serde(rename = "empty_layer")]
pub empty_layer: Option<bool>,
}
4 changes: 2 additions & 2 deletions src/container/oci/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ pub struct Rootfs {
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct History {
pub created: String,
pub created: Option<String>,
#[serde(rename = "created_by")]
pub created_by: String,
pub created_by: Option<String>,
#[serde(rename = "empty_layer")]
pub empty_layer: Option<bool>,
}

0 comments on commit ac45b86

Please sign in to comment.