tests: apply clippy lints

This commit is contained in:
figsoda 2021-10-16 10:10:48 -04:00
parent 2c5a57c01c
commit 1acf6e4d35
3 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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