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"
174
174
field_reassign_with_default = " allow"
175
175
forget_non_drop = " allow"
176
176
format_collect = " allow"
177
- if_same_then_else = " allow"
178
177
large_enum_variant = " allow"
179
178
match_like_matches_macro = " allow"
180
179
match_single_binding = " allow"
Original file line number Diff line number Diff line change @@ -1978,14 +1978,13 @@ fn run_rustfmt(
1978
1978
// approach: if the command name contains a path separator, join it with the workspace root.
1979
1979
// however, if the path is absolute, joining will result in the absolute path being preserved.
1980
1980
// 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
+ } ;
1989
1988
process:: Command :: new ( cmd_path)
1990
1989
}
1991
1990
None => process:: Command :: new ( cmd) ,
You can’t perform that action at this time.
0 commit comments