summaryrefslogtreecommitdiff
path: root/src/cmd/show_gen.rs
diff options
context:
space:
mode:
authorAlexander Batischev <eual.jp@gmail.com>2021-04-25 21:31:11 +0300
committerAlexander Batischev <eual.jp@gmail.com>2021-04-26 16:01:16 +0300
commit2991aade4d71d28dcf30d089e54269934e4885b6 (patch)
tree6e0f313d3dfa11776010708edff92f182cea2e0e /src/cmd/show_gen.rs
parentf21e6e0280b094efb72736f53931ecf0e7c2c0a2 (diff)
downloadobnam2-2991aade4d71d28dcf30d089e54269934e4885b6.tar.gz
Extend the iterator to users of LocalGeneration::files()
Diffstat (limited to 'src/cmd/show_gen.rs')
-rw-r--r--src/cmd/show_gen.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/show_gen.rs b/src/cmd/show_gen.rs
index 7dc52cf..df8a030 100644
--- a/src/cmd/show_gen.rs
+++ b/src/cmd/show_gen.rs
@@ -21,9 +21,10 @@ impl ShowGeneration {
let genlist = client.list_generations()?;
let gen_id: String = genlist.resolve(&self.gen_id)?;
let gen = client.fetch_generation(&gen_id, temp.path())?;
- let files = gen.files()?;
+ let mut files = gen.files()?;
+ let mut files = files.iter()?;
- let total_bytes = files.into_iter().try_fold(0, |acc, file| {
+ let total_bytes = files.try_fold(0, |acc, file| {
file.map(|file| {
let e = file.entry();
if e.kind() == FilesystemKind::Regular {