Skip to content

Commit

Permalink
Merge pull request #6 from acridotheres/rustfmt-b8c276142896fe2fdaf4f…
Browse files Browse the repository at this point in the history
…f610a5afdf16c7bf16f

Format code using rustfmt for b8c2761
  • Loading branch information
Le0X8 authored Aug 2, 2024
2 parents b8c2761 + 4a32157 commit 0070c2d
Showing 1 changed file with 24 additions and 28 deletions.
52 changes: 24 additions & 28 deletions src/commands/create.rs
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
use corelib::{archive::{self, EntrySource}, file::FsFile, formats};
use corelib::{
archive::{self, EntrySource},
file::FsFile,
formats,
};

pub fn create(
format: String,
input: String,
output: String,
buffer_size: u64,
) {
let files: Vec<EntrySource> = input.split(';').map(|file| {
let file = file.split(':').collect::<Vec<&str>>();
let source_path = file.get(0).unwrap();
let mut target_path = source_path;
match file.get(1) {
Some(path) => {
target_path = path;
pub fn create(format: String, input: String, output: String, buffer_size: u64) {
let files: Vec<EntrySource> = input
.split(';')
.map(|file| {
let file = file.split(':').collect::<Vec<&str>>();
let source_path = file.get(0).unwrap();
let mut target_path = source_path;
match file.get(1) {
Some(path) => {
target_path = path;
}
None => {}
}
None => {}
}
EntrySource {
path: target_path.to_string(),
source: FsFile::new(&source_path.to_string()),
}
}).collect();
archive::create(
formats::from_string(&format),
output,
files,
buffer_size,
)
.unwrap();
EntrySource {
path: target_path.to_string(),
source: FsFile::new(&source_path.to_string()),
}
})
.collect();
archive::create(formats::from_string(&format), output, files, buffer_size).unwrap();
}

0 comments on commit 0070c2d

Please sign in to comment.