Avoid lossy OsString conversions

This commit is contained in:
Laurențiu Nicola
2020-04-24 21:48:30 +03:00
parent 5d97667f8d
commit 58dde891f8
5 changed files with 14 additions and 9 deletions

View File

@@ -384,7 +384,7 @@ pub fn handle_runnables(
args: check_args,
extra_args: Vec::new(),
env: FxHashMap::default(),
cwd: workspace_root.map(|root| root.to_string_lossy().to_string()),
cwd: workspace_root.map(|root| root.to_owned()),
});
Ok(res)
}
@@ -984,7 +984,7 @@ fn to_lsp_runnable(
m.insert("RUST_BACKTRACE".to_string(), "short".to_string());
m
},
cwd: world.workspace_root_for(file_id).map(|root| root.to_string_lossy().to_string()),
cwd: world.workspace_root_for(file_id).map(|root| root.to_owned()),
})
}