diff --git a/crates/packager/src/package/app/mod.rs b/crates/packager/src/package/app/mod.rs index 698071f1..577bb466 100644 --- a/crates/packager/src/package/app/mod.rs +++ b/crates/packager/src/package/app/mod.rs @@ -42,17 +42,13 @@ pub(crate) fn package(ctx: &Context) -> crate::Result> { dbg!(&bin_dir); dbg!(&std::fs::read_dir(config.out_dir())? .map(|res| res.map(|e| e.path())) - .collect::, std::io::Error>>()? - .into_iter() - .flatten()); + .collect::, std::io::Error>>()?); for bin in &config.binaries { let bin_path = config.binary_path(bin); dbg!(&bin_path); dbg!(&std::fs::read_dir(bin_path.parent().unwrap())? .map(|res| res.map(|e| e.path())) - .collect::, std::io::Error>>()? - .into_iter() - .flatten()); + .collect::, std::io::Error>>()?); std::fs::copy(&bin_path, bin_dir.join(&bin.filename))?; } diff --git a/crates/packager/src/package/deb/mod.rs b/crates/packager/src/package/deb/mod.rs index 3ed4a061..d931cd01 100644 --- a/crates/packager/src/package/deb/mod.rs +++ b/crates/packager/src/package/deb/mod.rs @@ -147,17 +147,13 @@ pub fn generate_data(config: &Config, data_dir: &Path) -> crate::Result, std::io::Error>>()? - .into_iter() - .flatten()); + .collect::, std::io::Error>>()?); for bin in config.binaries.iter() { let bin_path = config.binary_path(bin); dbg!(&bin_path); dbg!(&std::fs::read_dir(bin_path.parent().unwrap())? .map(|res| res.map(|e| e.path())) - .collect::, std::io::Error>>()? - .into_iter() - .flatten()); + .collect::, std::io::Error>>()?); std::fs::copy(&bin_path, bin_dir.join(&bin.filename))?; }