Skip to content

Commit

Permalink
Alias stats id field as Id, for Podman compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
kierendavies authored and fussybeaver committed Mar 21, 2023
1 parent 44ce77c commit 84f5c26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,9 @@ pub struct Stats {
pub precpu_stats: CPUStats,
pub storage_stats: StorageStats,
pub name: String,

// Podman incorrectly capitalises the "id" field. See https://github.com/containers/podman/issues/17869
#[serde(alias = "Id")]
pub id: String,
}

Expand Down

0 comments on commit 84f5c26

Please sign in to comment.