File tree Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Expand file tree Collapse file tree 2 files changed +6
-13
lines changed Original file line number Diff line number Diff line change 1- use std:: { collections:: HashMap , env:: current_dir , fs, path:: PathBuf } ;
1+ use std:: { collections:: HashMap , env, fs, path:: PathBuf } ;
22
33use serde:: { Deserialize , Serialize } ;
44use zed_extension_api:: {
@@ -299,15 +299,8 @@ impl Debugger {
299299 & self ,
300300 initialization_options : Option < Value > ,
301301 ) -> zed:: Result < Value > {
302- let mut current_dir =
303- current_dir ( ) . map_err ( |err| format ! ( "could not get current dir: {err}" ) ) ?;
304-
305- if current_platform ( ) . 0 == Os :: Windows {
306- current_dir = current_dir
307- . strip_prefix ( "/" )
308- . map_err ( |err| err. to_string ( ) ) ?
309- . to_path_buf ( ) ;
310- }
302+ let current_dir =
303+ env:: current_dir ( ) . map_err ( |err| format ! ( "could not get current dir: {err}" ) ) ?;
311304
312305 let canonical_path = Value :: String (
313306 current_dir
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ mod debugger;
22mod lsp;
33use std:: {
44 collections:: BTreeSet ,
5- env:: current_dir ,
5+ env,
66 fs:: { self , create_dir} ,
77 path:: { Path , PathBuf } ,
88 str:: FromStr ,
@@ -427,8 +427,8 @@ impl Extension for Java {
427427 language_server_id : & LanguageServerId ,
428428 worktree : & Worktree ,
429429 ) -> zed:: Result < zed:: Command > {
430- let mut current_dir =
431- current_dir ( ) . map_err ( |err| format ! ( "could not get current dir: {err}" ) ) ?;
430+ let current_dir =
431+ env :: current_dir ( ) . map_err ( |err| format ! ( "could not get current dir: {err}" ) ) ?;
432432
433433 let configuration =
434434 self . language_server_workspace_configuration ( language_server_id, worktree) ?;
You can’t perform that action at this time.
0 commit comments