diff options
author | Wojciech Kępka <46892771+wojciechkepka@users.noreply.github.com> | 2021-02-06 07:56:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-06 01:56:35 -0500 |
commit | 9b85dc8a9d370139e8eb3cafadf5a0f8f6dc6597 (patch) | |
tree | c92d23ef7775e40bcd56e87d979347096f841d08 /src | |
parent | f5017f603afab9821966032ea652cb3161051f17 (diff) |
Image::import argument tarball is now generic (#253)
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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<R>( self, - mut tarball: Box<dyn Read>, - ) -> impl Stream<Item = Result<Value>> + Unpin + 'a { + mut tarball: R, + ) -> impl Stream<Item = Result<Value>> + Unpin + 'a + where + R: Read + Send + 'a, + { Box::pin( async move { let mut bytes = Vec::default(); |