From 4e3f69c34a177697af940849fced1a284fc09449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20K=C4=99pka?= <46892771+wojciechkepka@users.noreply.github.com> Date: Sat, 6 Feb 2021 08:14:39 +0100 Subject: Simplify api, get rid of unnecessary lifetimes (#252) * Get rid of explicit lifetimes * more lifetimes ellided * Fix examples * Minor fix --- examples/attach.rs | 3 ++- examples/logs.rs | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/attach.rs b/examples/attach.rs index e4ed637..769bc64 100644 --- a/examples/attach.rs +++ b/examples/attach.rs @@ -9,7 +9,8 @@ async fn main() -> Result<(), Box> { .nth(1) .expect("You need to specify a container id"); - let tty_multiplexer = docker.containers().get(&id).attach().await?; + let containers = docker.containers(); + let tty_multiplexer = containers.get(&id).attach().await?; let (mut reader, _writer) = tty_multiplexer.split(); diff --git a/examples/logs.rs b/examples/logs.rs index 73c8045..eb3bdb5 100644 --- a/examples/logs.rs +++ b/examples/logs.rs @@ -9,8 +9,9 @@ async fn main() { .nth(1) .expect("You need to specify a container id"); - let mut logs_stream = docker - .containers() + let containers = docker.containers(); + + let mut logs_stream = containers .get(&id) .logs(&LogsOptions::builder().stdout(true).stderr(true).build()); -- cgit v1.2.3