summaryrefslogtreecommitdiffstats
path: root/examples/export.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/export.rs')
-rw-r--r--examples/export.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/export.rs b/examples/export.rs
index 34f460d..22c543e 100644
--- a/examples/export.rs
+++ b/examples/export.rs
@@ -14,9 +14,7 @@ async fn main() {
.open(format!("{}.tar", &id))
.unwrap();
- let images = docker.images();
-
- while let Some(export_result) = images.get(&id).export().next().await {
+ while let Some(export_result) = docker.images().get(&id).export().next().await {
match export_result.and_then(|bytes| export_file.write(&bytes).map_err(Error::from)) {
Ok(n) => println!("copied {} bytes", n),
Err(e) => eprintln!("Error: {}", e),