mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-06 19:45:29 +00:00
tests: apply clippy lints
This commit is contained in:
parent
2c5a57c01c
commit
1acf6e4d35
@ -103,9 +103,9 @@ fn test_compressing_and_decompressing_archive(format: &str) {
|
||||
(0..quantity_of_files).map(|_| generate_random_file_content(&mut rng)).collect();
|
||||
|
||||
// Create them
|
||||
let mut file_paths = create_files(&testing_dir_path, &contents_of_files);
|
||||
let mut file_paths = create_files(testing_dir_path, &contents_of_files);
|
||||
// Compress them
|
||||
let compressed_archive_path = compress_files(&testing_dir_path, &file_paths, &format);
|
||||
let compressed_archive_path = compress_files(testing_dir_path, &file_paths, format);
|
||||
// Decompress them
|
||||
let mut extracted_paths = extract_files(&compressed_archive_path);
|
||||
|
||||
|
@ -20,11 +20,11 @@ fn test_compress_decompress_with_empty_dir(format: &str) {
|
||||
|
||||
let testing_dir_path = testing_dir.path();
|
||||
|
||||
let empty_dir_path: PathBuf = create_empty_dir(&testing_dir_path, "dummy_empty_dir_name");
|
||||
let empty_dir_path: PathBuf = create_empty_dir(testing_dir_path, "dummy_empty_dir_name");
|
||||
|
||||
let mut file_paths: Vec<PathBuf> = vec![empty_dir_path];
|
||||
|
||||
let compressed_archive_path: PathBuf = compress_files(&testing_dir_path, &file_paths, &format);
|
||||
let compressed_archive_path: PathBuf = compress_files(testing_dir_path, &file_paths, format);
|
||||
|
||||
let mut extracted_paths = extract_files(&compressed_archive_path);
|
||||
|
||||
|
@ -22,7 +22,7 @@ pub fn compress_files(at: &Path, paths_to_compress: &[PathBuf], format: &str) ->
|
||||
let archive_path = String::from("archive.") + format;
|
||||
let archive_path = at.join(archive_path);
|
||||
|
||||
let command = Command::Compress { files: paths_to_compress.to_vec(), output_path: archive_path.to_path_buf() };
|
||||
let command = Command::Compress { files: paths_to_compress.to_vec(), output_path: archive_path.clone() };
|
||||
run(command, &oof::Flags::default()).expect("Failed to compress test dummy files");
|
||||
|
||||
archive_path
|
||||
|
Loading…
x
Reference in New Issue
Block a user