Skip to content

Commit

Permalink
Use MAIN_SEPARATOR instead of MAIN_SEPARATOR_STR
Browse files Browse the repository at this point in the history
  • Loading branch information
Veykril committed Oct 6, 2023
1 parent 0973d78 commit 5522357
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/rust-analyzer/src/handlers/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5522357

Please sign in to comment.