diff --git a/e2e_tests/tests/pmem_ext2.rs b/e2e_tests/tests/pmem_ext2.rs index 34b6d00bec..bf3779e98d 100644 --- a/e2e_tests/tests/pmem_ext2.rs +++ b/e2e_tests/tests/pmem_ext2.rs @@ -104,8 +104,8 @@ fn pmem_ext2_manyfiles() -> anyhow::Result<()> { let temp_dir = tempfile::tempdir()?; for i in 0..1000 { - let f = temp_dir.path().join(&format!("{i}.txt")); - std::fs::write(f, &format!("{i}"))?; + let f = temp_dir.path().join(format!("{i}.txt")); + std::fs::write(f, format!("{i}"))?; } let config = Config::new().extra_args(vec![ diff --git a/ext2/tests/tests.rs b/ext2/tests/tests.rs index 249010d48b..cb1838de5f 100644 --- a/ext2/tests/tests.rs +++ b/ext2/tests/tests.rs @@ -594,7 +594,7 @@ fn test_multiple_block_directory_entry() { std::fs::create_dir(&dir).unwrap(); for i in 0..1000 { - let path = dir.join(&format!("{i}.txt")); + let path = dir.join(format!("{i}.txt")); File::create(&path).unwrap(); } @@ -705,7 +705,7 @@ fn test_multiple_bg_big_files() { // Prepare a large data. let data = vec!["0123456789"; 5000 * 20].concat(); for i in 0..10 { - let path = dir.join(&format!("{i}.txt")); + let path = dir.join(format!("{i}.txt")); let mut f = File::create(&path).unwrap(); f.write_all(data.as_bytes()).unwrap(); }