From 9b85dc8a9d370139e8eb3cafadf5a0f8f6dc6597 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 07:56:35 +0100 Subject: Image::import argument tarball is now generic (#253) --- src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 9a93c02..da60d27 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -245,10 +245,13 @@ impl<'a> Images<'a> { /// imports an image or set of images from a given tarball source /// source can be uncompressed on compressed via gzip, bzip2 or xz - pub fn import( + pub fn import( self, - mut tarball: Box, - ) -> impl Stream> + Unpin + 'a { + mut tarball: R, + ) -> impl Stream> + Unpin + 'a + where + R: Read + Send + 'a, + { Box::pin( async move { let mut bytes = Vec::default(); -- cgit v1.2.3