Skip to content

Commit

Permalink
fix: revert back to using relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
liv committed May 17, 2023
1 parent 0667ee7 commit 2d544f1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/project.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use glob::glob;
use serde::{Deserialize, Serialize};
use std::env;
use std::error::Error;
use std::path::PathBuf;
use std::process::Command;
use std::{env, fs};

/// Contains the structure of resulting rust-project.json file
/// and functions to build the data required to create the file
Expand Down Expand Up @@ -42,9 +42,8 @@ impl RustAnalyzerProject {
fn path_to_json(&mut self, path: PathBuf) -> Result<(), Box<dyn Error>> {
if let Some(ext) = path.extension() {
if ext == "rs" {
let abspath = fs::canonicalize(path)?;
self.crates.push(Crate {
root_module: abspath.display().to_string(),
root_module: path.display().to_string(),
edition: "2021".to_string(),
deps: Vec::new(),
// This allows rust_analyzer to work inside #[test] blocks
Expand Down

0 comments on commit 2d544f1

Please sign in to comment.