Cleaned up imports from previous commit
This commit is contained in:
parent
39b8664c9e
commit
3b88759665
@ -1,24 +1,21 @@
|
||||
use std::{
|
||||
use {
|
||||
crate::{Entry, Item, Package, Plist, Specs},
|
||||
rayon::prelude::{IntoParallelRefIterator, ParallelIterator},
|
||||
std::{
|
||||
borrow::BorrowMut,
|
||||
env,
|
||||
error::Error,
|
||||
fs::File,
|
||||
io::Write,
|
||||
io::{self, Write},
|
||||
path::Path,
|
||||
sync::{
|
||||
atomic::{AtomicUsize, Ordering},
|
||||
mpsc::{self, Receiver},
|
||||
mpsc::{self, Receiver, Sender},
|
||||
Mutex,
|
||||
},
|
||||
};
|
||||
|
||||
use rayon::prelude::{IntoParallelRefIterator, ParallelIterator};
|
||||
use walkdir::WalkDir;
|
||||
use zstd::Encoder;
|
||||
|
||||
use crate::{Entry, Item, Plist, Package};
|
||||
|
||||
use {
|
||||
crate::Specs,
|
||||
std::{env, error::Error, io, path::Path, sync::mpsc::Sender},
|
||||
walkdir::DirEntry,
|
||||
},
|
||||
walkdir::{DirEntry, WalkDir},
|
||||
zstd::Encoder,
|
||||
};
|
||||
|
||||
pub enum Message {
|
||||
@ -109,7 +106,8 @@ impl Creator {
|
||||
let mut writer = writer.into_inner()?;
|
||||
writer.write_all(&node.to_vec()?)?;
|
||||
let _fd = writer.finish()?;
|
||||
self.sender.send(Message::Success(format!("{} saved", archive.display())))?;
|
||||
self.sender
|
||||
.send(Message::Success(format!("{} saved", archive.display())))?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
@ -92,7 +92,10 @@ impl Package {
|
||||
to_string_pretty(self, cfg)
|
||||
}
|
||||
|
||||
pub(crate) fn save_ron_and_create_tar_node(&self, outdir: &Path) -> Result<Node, Box<dyn Error>> {
|
||||
pub(crate) fn save_ron_and_create_tar_node(
|
||||
&self,
|
||||
outdir: &Path,
|
||||
) -> Result<Node, Box<dyn Error>> {
|
||||
if !outdir.exists() {
|
||||
fs::create_dir_all(outdir)?;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user