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 11use glob:: glob;
22use serde:: { Deserialize , Serialize } ;
3+ use std:: env;
34use std:: error:: Error ;
45use std:: path:: PathBuf ;
56use std:: process:: Command ;
6- use std:: { env, fs} ;
77
88/// Contains the structure of resulting rust-project.json file
99/// and functions to build the data required to create the file
@@ -42,9 +42,8 @@ impl RustAnalyzerProject {
4242 fn path_to_json ( & mut self , path : PathBuf ) -> Result < ( ) , Box < dyn Error > > {
4343 if let Some ( ext) = path. extension ( ) {
4444 if ext == "rs" {
45- let abspath = fs:: canonicalize ( path) ?;
4645 self . crates . push ( Crate {
47- root_module : abspath . display ( ) . to_string ( ) ,
46+ root_module : path . display ( ) . to_string ( ) ,
4847 edition : "2021" . to_string ( ) ,
4948 deps : Vec :: new ( ) ,
5049 // This allows rust_analyzer to work inside #[test] blocks
You can’t perform that action at this time.
0 commit comments