diff options
author | ShuiRuTian <[email protected]> | 2021-01-12 16:53:17 +0000 |
---|---|---|
committer | ShuiRuTian <[email protected]> | 2021-01-12 16:53:17 +0000 |
commit | 5f8fa66b77d33b6adfcfa20d138f9dd3a8de35b4 (patch) | |
tree | 1d1e94afb928ae49870ad75feeaad5f1c557edd9 /crates | |
parent | e1c9c9b6049d9610d2e4454ffb7c337cb5c69d5b (diff) |
use path rather than hard code.
Diffstat (limited to 'crates')
-rw-r--r-- | crates/rust-analyzer/tests/rust-analyzer/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/rust-analyzer/tests/rust-analyzer/main.rs b/crates/rust-analyzer/tests/rust-analyzer/main.rs index 787239385..97f06d94c 100644 --- a/crates/rust-analyzer/tests/rust-analyzer/main.rs +++ b/crates/rust-analyzer/tests/rust-analyzer/main.rs | |||
@@ -744,8 +744,8 @@ fn test_will_rename_files_same_level() { | |||
744 | // } | 744 | // } |
745 | let tmp_dir = TestDir::new(); | 745 | let tmp_dir = TestDir::new(); |
746 | let tmp_dir_path = tmp_dir.path().to_owned(); | 746 | let tmp_dir_path = tmp_dir.path().to_owned(); |
747 | let tmp_dir_path = tmp_dir_path.to_str().unwrap(); | 747 | let tmp_dir_str = tmp_dir_path.to_str().unwrap(); |
748 | let base_path = PathBuf::from(format!("file://{}", tmp_dir_path)); | 748 | let base_path = PathBuf::from(format!("file://{}", tmp_dir_str)); |
749 | 749 | ||
750 | let code = r#" | 750 | let code = r#" |
751 | //- /Cargo.toml | 751 | //- /Cargo.toml |
@@ -784,7 +784,7 @@ fn main() {} | |||
784 | "documentChanges": [ | 784 | "documentChanges": [ |
785 | { | 785 | { |
786 | "textDocument": { | 786 | "textDocument": { |
787 | "uri": format!("file://{}/src/lib.rs", tmp_dir_path), | 787 | "uri": format!("file://{}", tmp_dir_path.join("src").join("lib.rs")), |
788 | "version": null | 788 | "version": null |
789 | }, | 789 | }, |
790 | "edits": [ | 790 | "edits": [ |
@@ -845,7 +845,7 @@ fn main() {} | |||
845 | "documentChanges": [ | 845 | "documentChanges": [ |
846 | { | 846 | { |
847 | "textDocument": { | 847 | "textDocument": { |
848 | "uri": format!("file://{}/src/lib.rs", tmp_dir_path), | 848 | "uri": format!("file://{}", tmp_dir_path.join("src").join("lib.rs")), |
849 | "version": null | 849 | "version": null |
850 | }, | 850 | }, |
851 | "edits": [ | 851 | "edits": [ |