File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed
crates/rust-analyzer/src/handlers Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,6 @@ derived_hash_with_manual_eq = "allow"
174174field_reassign_with_default = " allow"
175175forget_non_drop = " allow"
176176format_collect = " allow"
177- if_same_then_else = " allow"
178177large_enum_variant = " allow"
179178match_like_matches_macro = " allow"
180179match_single_binding = " allow"
Original file line number Diff line number Diff line change @@ -1978,14 +1978,13 @@ fn run_rustfmt(
19781978 // approach: if the command name contains a path separator, join it with the workspace root.
19791979 // however, if the path is absolute, joining will result in the absolute path being preserved.
19801980 // as a fallback, rely on $PATH-based discovery.
1981- let cmd_path =
1982- if cfg ! ( windows) && command. contains ( [ std:: path:: MAIN_SEPARATOR , '/' ] ) {
1983- spec. workspace_root . join ( cmd) . into ( )
1984- } else if command. contains ( std:: path:: MAIN_SEPARATOR ) {
1985- spec. workspace_root . join ( cmd) . into ( )
1986- } else {
1987- cmd
1988- } ;
1981+ let cmd_path = if command. contains ( std:: path:: MAIN_SEPARATOR )
1982+ || ( cfg ! ( windows) && command. contains ( '/' ) )
1983+ {
1984+ spec. workspace_root . join ( cmd) . into ( )
1985+ } else {
1986+ cmd
1987+ } ;
19891988 process:: Command :: new ( cmd_path)
19901989 }
19911990 None => process:: Command :: new ( cmd) ,
You can’t perform that action at this time.
0 commit comments