File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 1
1
use glob:: glob;
2
2
use serde:: { Deserialize , Serialize } ;
3
+ use std:: env;
3
4
use std:: error:: Error ;
4
5
use std:: path:: PathBuf ;
5
6
use std:: process:: Command ;
6
- use std:: { env, fs} ;
7
7
8
8
/// Contains the structure of resulting rust-project.json file
9
9
/// and functions to build the data required to create the file
@@ -42,9 +42,8 @@ impl RustAnalyzerProject {
42
42
fn path_to_json ( & mut self , path : PathBuf ) -> Result < ( ) , Box < dyn Error > > {
43
43
if let Some ( ext) = path. extension ( ) {
44
44
if ext == "rs" {
45
- let abspath = fs:: canonicalize ( path) ?;
46
45
self . crates . push ( Crate {
47
- root_module : abspath . display ( ) . to_string ( ) ,
46
+ root_module : path . display ( ) . to_string ( ) ,
48
47
edition : "2021" . to_string ( ) ,
49
48
deps : Vec :: new ( ) ,
50
49
// This allows rust_analyzer to work inside #[test] blocks
You can’t perform that action at this time.
0 commit comments