diff options
author | softprops <d.tangren@gmail.com> | 2018-12-24 13:49:21 +0900 |
---|---|---|
committer | softprops <d.tangren@gmail.com> | 2018-12-24 13:49:21 +0900 |
commit | 233235645004d6694a91be14c62e16cefd6429f4 (patch) | |
tree | d6b1ee0ab8e81eda92bd2d3976888cfd7d02d5d0 | |
parent | fcc4f7b9c648290887d90c5d8fe91b70e594870d (diff) |
render id
-rw-r--r-- | examples/images.rs | 6 | ||||
-rw-r--r-- | src/lib.rs | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/examples/images.rs b/examples/images.rs index ab36b3d..de04ab9 100644 --- a/examples/images.rs +++ b/examples/images.rs @@ -9,7 +9,11 @@ fn main() { .list(&Default::default()) .map(|images| { for i in images { - println!("{:?}", i.repo_tags.unwrap_or_else(|| vec!["none".into()])); + println!( + "{} {:?}", + i.id, + i.repo_tags.unwrap_or_else(|| vec!["none".into()]) + ); } }) .map_err(|e| eprintln!("Error: {}", e)); @@ -195,10 +195,7 @@ impl<'a> Images<'a> { self.docker .stream_post::<Body>(&path.join("?"), None) // todo: give this a proper enum type - .and_then(|r| { - println!("parsing {:?}", r); - serde_json::from_slice::<Value>(&r[..]).map_err(Error::from) - }) + .and_then(|r| serde_json::from_slice::<Value>(&r[..]).map_err(Error::from)) } /// exports a collection of named images, |