From 1484d0688759033b6fc63538f4fa06288553db92 Mon Sep 17 00:00:00 2001 From: Krysztal112233 Date: Sat, 23 Mar 2024 16:56:43 +0800 Subject: [PATCH] lint: fix `clippy::manual_main_separator_str` for `util.rs` on Windows cfg. --- tests/common/util.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/common/util.rs b/tests/common/util.rs index 1d9786bbe..81c9e1627 100644 --- a/tests/common/util.rs +++ b/tests/common/util.rs @@ -1016,7 +1016,7 @@ impl AtPath { pub fn relative_symlink_file(&self, original: &str, link: &str) { #[cfg(windows)] - let original = original.replace('/', &MAIN_SEPARATOR.to_string()); + let original = original.replace('/', std::path::MAIN_SEPARATOR_STR); log_info( "symlink", format!("{},{}", &original, &self.plus_as_string(link)), @@ -1038,7 +1038,7 @@ impl AtPath { pub fn relative_symlink_dir(&self, original: &str, link: &str) { #[cfg(windows)] - let original = original.replace('/', &MAIN_SEPARATOR.to_string()); + let original = original.replace('/', std::path::MAIN_SEPARATOR_STR); log_info( "symlink", format!("{},{}", &original, &self.plus_as_string(link)),