diff options
author | Eli W. Hunter <42009212+elihunter173@users.noreply.github.com> | 2021-02-20 19:36:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-20 19:36:31 -0500 |
commit | 9c72d3aacb675c5bcff238ce4996dbbe138e11c8 (patch) | |
tree | 692b95faa1a8226a6c29efe1f349ae999eddc735 /examples/export.rs | |
parent | 5af822c5691a772cad36bd9a69e94419b03d4511 (diff) |
Fix lifetimes (#272)
* Some changes
* Clarify lifetimes in transport.rs
* Fix remaining easy lifetimes in lib.rs
* Refactor Images::build for new lifetimes to work
* Fix Exec::start()
* Fix Container::exec()
* Make header_bytes not a Vec
* Make Docker::{images,...}() lifetimes explicit
* Fix Containers::get()
* Remove unnecessary locals from examples
* Update changelog
* Appease clippy
Diffstat (limited to 'examples/export.rs')
-rw-r--r-- | examples/export.rs | 4 |
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), |