From 9c72d3aacb675c5bcff238ce4996dbbe138e11c8 Mon Sep 17 00:00:00 2001 From: "Eli W. Hunter" <42009212+elihunter173@users.noreply.github.com> Date: Sat, 20 Feb 2021 19:36:31 -0500 Subject: 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 --- examples/export.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'examples/export.rs') 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), -- cgit v1.2.3