From 5522357fd049e1baae80d111908983c0c419594f Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 6 Oct 2023 13:04:39 +0200 Subject: [PATCH] Use MAIN_SEPARATOR instead of MAIN_SEPARATOR_STR --- crates/rust-analyzer/src/handlers/request.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/rust-analyzer/src/handlers/request.rs b/crates/rust-analyzer/src/handlers/request.rs index 1bbde9b295a8..4e1b7f42583d 100644 --- a/crates/rust-analyzer/src/handlers/request.rs +++ b/crates/rust-analyzer/src/handlers/request.rs @@ -2003,9 +2003,9 @@ fn run_rustfmt( // approach: if the command name contains a path seperator, join it with the workspace root. // however, if the path is absolute, joining will result in the absolute path being preserved. // as a fallback, rely on $PATH-based discovery. - let cmd_path = if cfg!(windows) && command.contains(&[std::path::MAIN_SEPARATOR_STR, '/']) { + let cmd_path = if cfg!(windows) && command.contains(&[std::path::MAIN_SEPARATOR, '/']) { spec.workspace_root.join(cmd).into() - } else if command.contains(std::path::MAIN_SEPARATOR_STR) { + } else if command.contains(std::path::MAIN_SEPARATOR) { spec.workspace_root.join(cmd).into() } else { cmd