mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 21:13:37 +00:00
Fix
This commit is contained in:
parent
3bad5587c8
commit
fb996cae6b
1 changed files with 6 additions and 0 deletions
|
@ -199,6 +199,7 @@ impl Expander {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
fn copy_to_temp_dir(path: &Path) -> io::Result<PathBuf> {
|
||||
let mut to = std::env::temp_dir();
|
||||
let file_name = path.file_name().ok_or_else(|| {
|
||||
|
@ -212,3 +213,8 @@ fn copy_to_temp_dir(path: &Path) -> io::Result<PathBuf> {
|
|||
std::fs::copy(path, &to)?;
|
||||
Ok(to)
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn copy_to_temp_dir(path: &Path) -> io::Result<PathBuf> {
|
||||
Ok(path.to_path_buf())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue