From ed705b967a85990b0e0d36187c9d64bba96f8046 Mon Sep 17 00:00:00 2001 From: boasting-squirrel Date: Thu, 14 Mar 2019 20:32:04 +0100 Subject: Cargo fmt --- src/archive.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/archive.rs') diff --git a/src/archive.rs b/src/archive.rs index b351fb9..c536c2d 100644 --- a/src/archive.rs +++ b/src/archive.rs @@ -49,7 +49,7 @@ impl CompressionMethod { pub fn create_archive_file( method: &CompressionMethod, dir: &PathBuf, - skip_symlinks: bool + skip_symlinks: bool, ) -> Result<(String, Bytes), errors::CompressionError> { match method { CompressionMethod::TarGz => tgz_compress(&dir, skip_symlinks), @@ -57,7 +57,10 @@ pub fn create_archive_file( } /// Compresses a given folder in .tar.gz format -fn tgz_compress(dir: &PathBuf, skip_symlinks: bool) -> Result<(String, Bytes), errors::CompressionError> { +fn tgz_compress( + dir: &PathBuf, + skip_symlinks: bool, +) -> Result<(String, Bytes), errors::CompressionError> { let src_dir = dir.display().to_string(); let inner_folder = match dir.file_name() { Some(directory_name) => match directory_name.to_str() { @@ -88,7 +91,11 @@ fn tgz_compress(dir: &PathBuf, skip_symlinks: bool) -> Result<(String, Bytes), e } /// Creates a temporary tar file of a given directory, reads it and returns its content as bytes -fn tar(src_dir: String, inner_folder: String, skip_symlinks: bool) -> Result, errors::CompressionError> { +fn tar( + src_dir: String, + inner_folder: String, + skip_symlinks: bool, +) -> Result, errors::CompressionError> { // Create a TAR file of src_dir let mut tar_builder = Builder::new(Vec::new()); -- cgit v1.2.3