aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe')
-rw-r--r--crates/shirabe/src/autoload/autoload_generator.rs8
-rw-r--r--crates/shirabe/src/cache.rs2
-rw-r--r--crates/shirabe/src/console/application.rs2
-rw-r--r--crates/shirabe/src/downloader/phar_downloader.rs2
-rw-r--r--crates/shirabe/src/downloader/tar_downloader.rs2
-rw-r--r--crates/shirabe/src/factory.rs2
-rw-r--r--crates/shirabe/src/installer/library_installer.rs2
-rw-r--r--crates/shirabe/src/package/archiver/zip_archiver.rs7
-rw-r--r--crates/shirabe/src/package/locker.rs2
-rw-r--r--crates/shirabe/src/repository/filesystem_repository.rs2
-rw-r--r--crates/shirabe/src/repository/vcs/fossil_driver.rs2
-rw-r--r--crates/shirabe/src/repository/vcs/git_driver.rs2
-rw-r--r--crates/shirabe/src/repository/vcs/hg_driver.rs2
-rw-r--r--crates/shirabe/src/util/filesystem.rs4
-rw-r--r--crates/shirabe/src/util/http/curl_downloader.rs14
-rw-r--r--crates/shirabe/src/util/tar.rs2
-rw-r--r--crates/shirabe/tests/command/bump_command_test.rs2
-rw-r--r--crates/shirabe/tests/command/validate_command_test.rs4
-rw-r--r--crates/shirabe/tests/installed_versions_test.rs2
-rw-r--r--crates/shirabe/tests/package/archiver/phar_archiver_test.rs2
-rw-r--r--crates/shirabe/tests/package/archiver/zip_archiver_test.rs2
-rw-r--r--crates/shirabe/tests/repository/path_repository_test.rs4
-rw-r--r--crates/shirabe/tests/util/filesystem_test.rs26
23 files changed, 48 insertions, 51 deletions
diff --git a/crates/shirabe/src/autoload/autoload_generator.rs b/crates/shirabe/src/autoload/autoload_generator.rs
index 70740a59..ef026d72 100644
--- a/crates/shirabe/src/autoload/autoload_generator.rs
+++ b/crates/shirabe/src/autoload/autoload_generator.rs
@@ -179,12 +179,12 @@ impl AutoloadGenerator {
// Fixes failing Windows realpath() implementation.
// See https://bugs.php.net/bug.php?id=72738
let base_path = filesystem.normalize_path(
- &realpath(&realpath(&Platform::get_cwd(false).unwrap_or_default()).unwrap_or_default())
+ &realpath(realpath(Platform::get_cwd(false).unwrap_or_default()).unwrap_or_default())
.unwrap_or_default(),
);
let vendor_path = filesystem.normalize_path(
&realpath(
- &realpath(config.get("vendor-dir").as_string().unwrap_or("")).unwrap_or_default(),
+ realpath(config.get("vendor-dir").as_string().unwrap_or("")).unwrap_or_default(),
)
.unwrap_or_default(),
);
@@ -692,7 +692,7 @@ impl AutoloadGenerator {
} else {
format!(
"{}/{}",
- realpath(&Platform::get_cwd(false).unwrap_or_default()).unwrap_or_default(),
+ realpath(Platform::get_cwd(false).unwrap_or_default()).unwrap_or_default(),
dir
)
};
@@ -1853,7 +1853,7 @@ class ComposerStaticInit{}
install_path.clone()
};
- let resolved_path = realpath(&format!(
+ let resolved_path = realpath(format!(
"{}/{}",
install_path_for_resolve,
updir.clone().unwrap_or_default()
diff --git a/crates/shirabe/src/cache.rs b/crates/shirabe/src/cache.rs
index 21e8f252..2e7ff3cb 100644
--- a/crates/shirabe/src/cache.rs
+++ b/crates/shirabe/src/cache.rs
@@ -198,7 +198,7 @@ impl Cache {
unlink(&temp_file_name);
let free_space = if function_exists("disk_free_space") {
- disk_free_space(&dirname(&temp_file_name))
+ disk_free_space(dirname(&temp_file_name))
.map(|space| space.to_string())
.unwrap_or_default()
} else {
diff --git a/crates/shirabe/src/console/application.rs b/crates/shirabe/src/console/application.rs
index 62e73aa9..19317363 100644
--- a/crates/shirabe/src/console/application.rs
+++ b/crates/shirabe/src/console/application.rs
@@ -2248,7 +2248,7 @@ impl ApplicationHandle {
} else if let Some(pe) = e.downcast_ref::<ParsingException>() {
let details = pe.get_details();
- let file = realpath(&Factory::get_composer_file().unwrap_or_default());
+ let file = realpath(Factory::get_composer_file().unwrap_or_default());
let line = details.line;
diff --git a/crates/shirabe/src/downloader/phar_downloader.rs b/crates/shirabe/src/downloader/phar_downloader.rs
index 32ac0b3f..795d0645 100644
--- a/crates/shirabe/src/downloader/phar_downloader.rs
+++ b/crates/shirabe/src/downloader/phar_downloader.rs
@@ -62,7 +62,7 @@ impl ArchiveDownloader for PharDownloader {
path: &str,
) -> anyhow::Result<Option<PhpMixed>> {
// Can throw an UnexpectedValueException
- let archive = Phar::new(file.to_string())?;
+ let archive = Phar::new(file)?;
archive.extract_to(path, None, true)?;
// TODO: handle openssl signed phars
// https://github.com/composer/composer/pull/33#issuecomment-2250768
diff --git a/crates/shirabe/src/downloader/tar_downloader.rs b/crates/shirabe/src/downloader/tar_downloader.rs
index a4446287..3c73595b 100644
--- a/crates/shirabe/src/downloader/tar_downloader.rs
+++ b/crates/shirabe/src/downloader/tar_downloader.rs
@@ -61,7 +61,7 @@ impl ArchiveDownloader for TarDownloader {
file: &str,
path: &str,
) -> anyhow::Result<Option<PhpMixed>> {
- let archive = PharData::new(file.to_string())?;
+ let archive = PharData::new(file)?;
archive.extract_to(path, None, true)?;
Ok(None)
diff --git a/crates/shirabe/src/factory.rs b/crates/shirabe/src/factory.rs
index a1fda63b..de632143 100644
--- a/crates/shirabe/src/factory.rs
+++ b/crates/shirabe/src/factory.rs
@@ -512,7 +512,7 @@ impl Factory {
Self::create_config(Some(io.clone()), Some(&cwd))?
};
let is_global = local_config_source != Config::SOURCE_UNKNOWN
- && realpath(&config.get_str("home")?) == realpath(&dirname(&local_config_source));
+ && realpath(&config.get_str("home")?) == realpath(dirname(&local_config_source));
config.merge(&local_config_data, &local_config_source);
if let Some(ref composer_file_path) = composer_file {
diff --git a/crates/shirabe/src/installer/library_installer.rs b/crates/shirabe/src/installer/library_installer.rs
index 479fc6d5..a037fac9 100644
--- a/crates/shirabe/src/installer/library_installer.rs
+++ b/crates/shirabe/src/installer/library_installer.rs
@@ -205,7 +205,7 @@ impl LibraryInstaller {
self.filesystem
.borrow_mut()
.ensure_directory_exists(&self.vendor_dir.borrow());
- let realpath = realpath(&self.vendor_dir.borrow()).unwrap_or_default();
+ let realpath = realpath(self.vendor_dir.borrow().as_str()).unwrap_or_default();
*self.vendor_dir.borrow_mut() = realpath;
}
diff --git a/crates/shirabe/src/package/archiver/zip_archiver.rs b/crates/shirabe/src/package/archiver/zip_archiver.rs
index bf0144fb..186d76c7 100644
--- a/crates/shirabe/src/package/archiver/zip_archiver.rs
+++ b/crates/shirabe/src/package/archiver/zip_archiver.rs
@@ -74,15 +74,12 @@ impl ArchiverInterface for ZipArchiver {
if filepath.is_dir() {
zip.add_empty_dir(&relative_path.to_string_lossy());
} else {
- zip.add_file(
- &filepath.to_string_lossy(),
- &relative_path.to_string_lossy(),
- );
+ zip.add_file(&filepath, &relative_path.to_string_lossy());
}
// setExternalAttributesName() is only available with libzip 0.11.2 or above
if method_exists(&PhpMixed::Null, "setExternalAttributesName") {
- let perms = fileperms(&filepath.to_string_lossy());
+ let perms = fileperms(&filepath);
zip.set_external_attributes_name(
&relative_path.to_string_lossy(),
ZipArchive::OPSYS_UNIX,
diff --git a/crates/shirabe/src/package/locker.rs b/crates/shirabe/src/package/locker.rs
index b7d8ba7a..d2d1b109 100644
--- a/crates/shirabe/src/package/locker.rs
+++ b/crates/shirabe/src/package/locker.rs
@@ -807,7 +807,7 @@ impl Locker {
if path.is_none() {
return Ok(None);
}
- let path = realpath(&path.unwrap());
+ let path = realpath(path.unwrap());
let source_type = package.get_source_type();
let mut datetime: Option<chrono::DateTime<chrono::Utc>> = None;
diff --git a/crates/shirabe/src/repository/filesystem_repository.rs b/crates/shirabe/src/repository/filesystem_repository.rs
index 1949803b..b8ee30c6 100644
--- a/crates/shirabe/src/repository/filesystem_repository.rs
+++ b/crates/shirabe/src/repository/filesystem_repository.rs
@@ -644,7 +644,7 @@ impl FilesystemRepository {
let install_path = if package.as_root().is_some() {
let to = self.filesystem.borrow_mut().normalize_path(
- &realpath(&Platform::get_cwd(false).unwrap_or_default()).unwrap_or_default(),
+ &realpath(Platform::get_cwd(false).unwrap_or_default()).unwrap_or_default(),
);
Some(
self.filesystem
diff --git a/crates/shirabe/src/repository/vcs/fossil_driver.rs b/crates/shirabe/src/repository/vcs/fossil_driver.rs
index a75f6874..1b61ed4d 100644
--- a/crates/shirabe/src/repository/vcs/fossil_driver.rs
+++ b/crates/shirabe/src/repository/vcs/fossil_driver.rs
@@ -123,7 +123,7 @@ impl FossilDriver {
let mut fs = Filesystem::new(None);
fs.ensure_directory_exists(&self.checkout_dir)?;
- if !is_writable(&dirname(&self.checkout_dir)) {
+ if !is_writable(dirname(&self.checkout_dir)) {
return Err(RuntimeException {
message: format!(
"Can not clone {} to access package information. The \"{}\" directory is not writable by the current user.",
diff --git a/crates/shirabe/src/repository/vcs/git_driver.rs b/crates/shirabe/src/repository/vcs/git_driver.rs
index d3d489f2..1376ebbc 100644
--- a/crates/shirabe/src/repository/vcs/git_driver.rs
+++ b/crates/shirabe/src/repository/vcs/git_driver.rs
@@ -95,7 +95,7 @@ impl GitDriver {
let mut fs = Filesystem::new(None);
fs.ensure_directory_exists(&dirname(&self.repo_dir))?;
- if !is_writable(&dirname(&self.repo_dir)) {
+ if !is_writable(dirname(&self.repo_dir)) {
return Err(RuntimeException {
message: format!(
"Can not clone {} to access package information. The \"{}\" directory is not writable by the current user.",
diff --git a/crates/shirabe/src/repository/vcs/hg_driver.rs b/crates/shirabe/src/repository/vcs/hg_driver.rs
index a346094c..0283ed38 100644
--- a/crates/shirabe/src/repository/vcs/hg_driver.rs
+++ b/crates/shirabe/src/repository/vcs/hg_driver.rs
@@ -69,7 +69,7 @@ impl HgDriver {
let mut fs = Filesystem::new(None);
fs.ensure_directory_exists(&cache_vcs_dir)?;
- if !is_writable(&dirname(&self.repo_dir)) {
+ if !is_writable(dirname(&self.repo_dir)) {
return Err(RuntimeException {
message: format!(
"Can not clone {} to access package information. The \"{}\" directory is not writable by the current user.",
diff --git a/crates/shirabe/src/util/filesystem.rs b/crates/shirabe/src/util/filesystem.rs
index 51885cc3..daf26e22 100644
--- a/crates/shirabe/src/util/filesystem.rs
+++ b/crates/shirabe/src/util/filesystem.rs
@@ -499,7 +499,7 @@ impl Filesystem {
if file.is_dir() {
self.ensure_directory_exists(&target_path)?;
} else {
- result = result && copy(&file.get_pathname(), &target_path);
+ result = result && copy(file.get_pathname(), &target_path);
}
}
@@ -944,7 +944,7 @@ impl Filesystem {
let cwd = Platform::get_cwd(false).unwrap_or_default();
let relative_path = self.find_shortest_path(link, target, false, false);
- chdir(&dirname(link));
+ chdir(dirname(link));
let result = symlink(&relative_path, link);
chdir(&cwd);
diff --git a/crates/shirabe/src/util/http/curl_downloader.rs b/crates/shirabe/src/util/http/curl_downloader.rs
index 89e9661e..1207dea0 100644
--- a/crates/shirabe/src/util/http/curl_downloader.rs
+++ b/crates/shirabe/src/util/http/curl_downloader.rs
@@ -296,7 +296,7 @@ impl CurlDownloader {
crate::io::DEBUG,
);
if let Some(filename) = filename {
- unlink_silent(&format!("{}~", filename));
+ unlink_silent(format!("{}~", filename));
}
return Ok(Decision::Retry {
url: url.to_string(),
@@ -305,7 +305,7 @@ impl CurlDownloader {
}
if let Some(filename) = filename {
- unlink_silent(&format!("{}~", filename));
+ unlink_silent(format!("{}~", filename));
}
// PHP throws a MaxFileSizeExceededException (a TransportException subclass) with
// the raw "Maximum allowed download size reached..." message verbatim rather than
@@ -368,7 +368,7 @@ impl CurlDownloader {
.unwrap_or(0);
attributes.insert("retries".to_string(), PhpMixed::Int(retries + 1));
if let Some(filename) = filename {
- unlink_silent(&format!("{}~", filename));
+ unlink_silent(format!("{}~", filename));
}
return Ok(Decision::Retry {
url: url.to_string(),
@@ -392,7 +392,7 @@ impl CurlDownloader {
Ok(location) if !location.is_empty() => {
attributes.insert("redirects".to_string(), PhpMixed::Int(redirects + 1));
if let Some(filename) = filename {
- unlink_silent(&format!("{}~", filename));
+ unlink_silent(format!("{}~", filename));
}
return Ok(Decision::Retry {
url: location,
@@ -402,7 +402,7 @@ impl CurlDownloader {
Ok(_) => {}
Err(e) => {
if let Some(filename) = filename {
- unlink_silent(&format!("{}~", filename));
+ unlink_silent(format!("{}~", filename));
}
return Ok(Decision::Failed(e));
}
@@ -440,7 +440,7 @@ impl CurlDownloader {
);
attributes.insert("retries".to_string(), PhpMixed::Int(retries + 1));
if let Some(filename) = filename {
- unlink_silent(&format!("{}~", filename));
+ unlink_silent(format!("{}~", filename));
}
return Ok(Decision::Retry {
url: url.to_string(),
@@ -827,7 +827,7 @@ impl CurlDownloader {
error_message: &str,
) -> TransportException {
if let Some(filename) = filename {
- unlink_silent(&format!("{}~", filename));
+ unlink_silent(format!("{}~", filename));
}
let mut details = String::new();
diff --git a/crates/shirabe/src/util/tar.rs b/crates/shirabe/src/util/tar.rs
index 792d1c4f..f5b0ebbe 100644
--- a/crates/shirabe/src/util/tar.rs
+++ b/crates/shirabe/src/util/tar.rs
@@ -7,7 +7,7 @@ pub struct Tar;
impl Tar {
pub fn get_composer_json(path_to_archive: &str) -> anyhow::Result<Option<String>> {
- let phar = PharData::new(path_to_archive.to_string())?;
+ let phar = PharData::new(path_to_archive)?;
if !phar.valid() {
return Ok(None);
diff --git a/crates/shirabe/tests/command/bump_command_test.rs b/crates/shirabe/tests/command/bump_command_test.rs
index 14ac17a6..a7cdfd76 100644
--- a/crates/shirabe/tests/command/bump_command_test.rs
+++ b/crates/shirabe/tests/command/bump_command_test.rs
@@ -243,7 +243,7 @@ fn test_bump_fails_on_write_error_to_composer_file() {
let tear_down = init_temp_composer(Some(&serde_json::json!({})), None, None, false);
let composer_json_path = tear_down.working_dir().join("composer.json");
- shirabe_php_shim::chmod(&composer_json_path.to_string_lossy(), 0o444);
+ shirabe_php_shim::chmod(&composer_json_path, 0o444);
let mut app_tester = get_application_tester();
let status_code = app_tester
diff --git a/crates/shirabe/tests/command/validate_command_test.rs b/crates/shirabe/tests/command/validate_command_test.rs
index c40f66b2..8e78dfe7 100644
--- a/crates/shirabe/tests/command/validate_command_test.rs
+++ b/crates/shirabe/tests/command/validate_command_test.rs
@@ -163,7 +163,7 @@ fn test_unaccessible_file() {
let tear_down = init_temp_composer(Some(&minimal_valid_configuration()), None, None, true);
let composer_json = tear_down.working_dir().join("composer.json");
- shirabe_php_shim::chmod(&composer_json.to_string_lossy(), 0o200);
+ shirabe_php_shim::chmod(&composer_json, 0o200);
let mut app_tester = get_application_tester();
app_tester
@@ -176,6 +176,6 @@ fn test_unaccessible_file() {
);
assert_eq!(3, app_tester.get_status_code());
- shirabe_php_shim::chmod(&composer_json.to_string_lossy(), 0o700);
+ shirabe_php_shim::chmod(&composer_json, 0o700);
drop(tear_down);
}
diff --git a/crates/shirabe/tests/installed_versions_test.rs b/crates/shirabe/tests/installed_versions_test.rs
index 4de2730d..7257ff6a 100644
--- a/crates/shirabe/tests/installed_versions_test.rs
+++ b/crates/shirabe/tests/installed_versions_test.rs
@@ -402,7 +402,7 @@ fn test_get_install_path() {
assert_eq!(
realpath(&dir),
realpath(
- &InstalledVersions::get_install_path("__root__")
+ InstalledVersions::get_install_path("__root__")
.unwrap()
.unwrap()
)
diff --git a/crates/shirabe/tests/package/archiver/phar_archiver_test.rs b/crates/shirabe/tests/package/archiver/phar_archiver_test.rs
index 7d879973..a9163058 100644
--- a/crates/shirabe/tests/package/archiver/phar_archiver_test.rs
+++ b/crates/shirabe/tests/package/archiver/phar_archiver_test.rs
@@ -53,7 +53,7 @@ impl ArchiverTestCase {
fn write_file(&self, path: &str, content: &str, current_work_dir: &str) {
if !file_exists(dirname(path)) {
- mkdir(&dirname(path), 0o777, true);
+ mkdir(dirname(path), 0o777, true);
}
let result = file_put_contents(path, content.as_bytes());
diff --git a/crates/shirabe/tests/package/archiver/zip_archiver_test.rs b/crates/shirabe/tests/package/archiver/zip_archiver_test.rs
index b94beb6c..e20ca624 100644
--- a/crates/shirabe/tests/package/archiver/zip_archiver_test.rs
+++ b/crates/shirabe/tests/package/archiver/zip_archiver_test.rs
@@ -106,7 +106,7 @@ impl ArchiverTestCase {
fn write_file(&self, path: &str, content: String, current_work_dir: &str) {
if !file_exists(dirname(path)) {
- mkdir(&dirname(path), 0o777, true);
+ mkdir(dirname(path), 0o777, true);
}
let result = file_put_contents(path, content.as_bytes());
diff --git a/crates/shirabe/tests/repository/path_repository_test.rs b/crates/shirabe/tests/repository/path_repository_test.rs
index 24bf64d5..0631e7f7 100644
--- a/crates/shirabe/tests/repository/path_repository_test.rs
+++ b/crates/shirabe/tests/repository/path_repository_test.rs
@@ -201,7 +201,7 @@ fn test_url_remains_relative() {
// realpath() does not fully expand the paths
// PHP Bug https://bugs.php.net/bug.php?id=72642
let repository_url = [
- realpath(&realpath(&fixtures_dir().replace("/Fixtures", "")).unwrap_or_default())
+ realpath(realpath(fixtures_dir().replace("/Fixtures", "")).unwrap_or_default())
.unwrap_or_default(),
"Fixtures".to_string(),
"path".to_string(),
@@ -210,7 +210,7 @@ fn test_url_remains_relative() {
.join(DIRECTORY_SEPARATOR);
// getcwd() not necessarily match __DIR__
// PHP Bug https://bugs.php.net/bug.php?id=73797
- let cwd = realpath(&realpath(&Platform::get_cwd(false).unwrap()).unwrap_or_default())
+ let cwd = realpath(realpath(Platform::get_cwd(false).unwrap()).unwrap_or_default())
.unwrap_or_default();
let relative_url = repository_url[cwd.len().min(repository_url.len())..]
.trim_start_matches(DIRECTORY_SEPARATOR)
diff --git a/crates/shirabe/tests/util/filesystem_test.rs b/crates/shirabe/tests/util/filesystem_test.rs
index 2e160e87..5bb44598 100644
--- a/crates/shirabe/tests/util/filesystem_test.rs
+++ b/crates/shirabe/tests/util/filesystem_test.rs
@@ -433,7 +433,7 @@ fn test_remove_directory_php() {
let working_dir = tempfile::TempDir::new().unwrap();
let working_dir = working_dir.path().to_str().unwrap().to_string();
- mkdir(&format!("{working_dir}/level1/level2"), 0o777, true);
+ mkdir(format!("{working_dir}/level1/level2"), 0o777, true);
file_put_contents(
&format!("{working_dir}/level1/level2/hello.txt"),
b"hello world",
@@ -509,10 +509,10 @@ fn test_unlink_symlinked_directory() {
let working_dir = tempfile::TempDir::new().unwrap();
let basepath = working_dir.path().to_str().unwrap().to_string();
let symlinked = format!("{basepath}/linked");
- mkdir(&format!("{basepath}/real"), 0o777, true);
- touch(&format!("{basepath}/real/FILE"));
+ mkdir(format!("{basepath}/real"), 0o777, true);
+ touch(format!("{basepath}/real/FILE"));
- let result = symlink(&format!("{basepath}/real"), &symlinked);
+ let result = symlink(format!("{basepath}/real"), &symlinked);
if !result {
// Symbolic links for directories not supported on this platform.
@@ -534,12 +534,12 @@ fn test_remove_symlinked_directory_with_trailing_slash() {
let working_dir = tempfile::TempDir::new().unwrap();
let working_dir = working_dir.path().to_str().unwrap().to_string();
- mkdir(&format!("{working_dir}/real"), 0o777, true);
- touch(&format!("{working_dir}/real/FILE"));
+ mkdir(format!("{working_dir}/real"), 0o777, true);
+ touch(format!("{working_dir}/real/FILE"));
let symlinked = format!("{working_dir}/linked");
let symlinked_trailing_slash = format!("{symlinked}/");
- let result = symlink(&format!("{working_dir}/real"), &symlinked);
+ let result = symlink(format!("{working_dir}/real"), &symlinked);
if !result {
// Symbolic links for directories not supported on this platform.
@@ -567,7 +567,7 @@ fn test_junctions() {
let working_dir = tempfile::TempDir::new().unwrap();
let working_dir = working_dir.path().to_str().unwrap().to_string();
- mkdir(&format!("{working_dir}/real/nesting/testing"), 0o777, true);
+ mkdir(format!("{working_dir}/real/nesting/testing"), 0o777, true);
let mut fs = Filesystem::new(None);
// Non-Windows systems do not support this and will return false on all tests, and an exception
@@ -625,7 +625,7 @@ fn test_override_junctions() {
let working_dir = tempfile::TempDir::new().unwrap();
let working_dir = working_dir.path().to_str().unwrap().to_string();
- mkdir(&format!("{working_dir}/real/nesting/testing"), 0o777, true);
+ mkdir(format!("{working_dir}/real/nesting/testing"), 0o777, true);
let mut fs = Filesystem::new(None);
let old_target = format!("{working_dir}/real/nesting/testing");
@@ -667,8 +667,8 @@ fn test_copy() {
let unique_tmp = tempfile::TempDir::new().unwrap();
let test_file = format!("{}/composer_test_file", unique_tmp.path().to_str().unwrap());
- mkdir(&format!("{working_dir}/foo/bar"), 0o777, true);
- mkdir(&format!("{working_dir}/foo/baz"), 0o777, true);
+ mkdir(format!("{working_dir}/foo/bar"), 0o777, true);
+ mkdir(format!("{working_dir}/foo/baz"), 0o777, true);
file_put_contents(&format!("{working_dir}/foo/foo.file"), b"foo");
file_put_contents(&format!("{working_dir}/foo/bar/foobar.file"), b"foobar");
file_put_contents(&format!("{working_dir}/foo/baz/foobaz.file"), b"foobaz");
@@ -722,8 +722,8 @@ fn test_copy_then_remove() {
let unique_tmp = tempfile::TempDir::new().unwrap();
let test_file = format!("{}/composer_test_file", unique_tmp.path().to_str().unwrap());
- mkdir(&format!("{working_dir}/foo/bar"), 0o777, true);
- mkdir(&format!("{working_dir}/foo/baz"), 0o777, true);
+ mkdir(format!("{working_dir}/foo/bar"), 0o777, true);
+ mkdir(format!("{working_dir}/foo/baz"), 0o777, true);
file_put_contents(&format!("{working_dir}/foo/foo.file"), b"foo");
file_put_contents(&format!("{working_dir}/foo/bar/foobar.file"), b"foobar");
file_put_contents(&format!("{working_dir}/foo/baz/foobaz.file"), b"foobaz");