aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_project_model
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_project_model')
-rw-r--r--crates/ra_project_model/src/cargo_workspace.rs8
-rw-r--r--crates/ra_project_model/src/lib.rs2
-rw-r--r--crates/ra_project_model/src/sysroot.rs6
3 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs
index 04f7eb741..6d1154056 100644
--- a/crates/ra_project_model/src/cargo_workspace.rs
+++ b/crates/ra_project_model/src/cargo_workspace.rs
@@ -24,7 +24,7 @@ use rustc_hash::FxHashMap;
24/// 24///
25/// We use absolute paths here, `cargo metadata` guarantees to always produce 25/// We use absolute paths here, `cargo metadata` guarantees to always produce
26/// abs paths. 26/// abs paths.
27#[derive(Debug, Clone)] 27#[derive(Debug, Clone, Eq, PartialEq)]
28pub struct CargoWorkspace { 28pub struct CargoWorkspace {
29 packages: Arena<PackageData>, 29 packages: Arena<PackageData>,
30 targets: Arena<TargetData>, 30 targets: Arena<TargetData>,
@@ -68,7 +68,7 @@ pub type Package = Idx<PackageData>;
68 68
69pub type Target = Idx<TargetData>; 69pub type Target = Idx<TargetData>;
70 70
71#[derive(Debug, Clone)] 71#[derive(Debug, Clone, Eq, PartialEq)]
72pub struct PackageData { 72pub struct PackageData {
73 pub version: String, 73 pub version: String,
74 pub name: String, 74 pub name: String,
@@ -83,13 +83,13 @@ pub struct PackageData {
83 pub proc_macro_dylib_path: Option<AbsPathBuf>, 83 pub proc_macro_dylib_path: Option<AbsPathBuf>,
84} 84}
85 85
86#[derive(Debug, Clone)] 86#[derive(Debug, Clone, Eq, PartialEq)]
87pub struct PackageDependency { 87pub struct PackageDependency {
88 pub pkg: Package, 88 pub pkg: Package,
89 pub name: String, 89 pub name: String,
90} 90}
91 91
92#[derive(Debug, Clone)] 92#[derive(Debug, Clone, Eq, PartialEq)]
93pub struct TargetData { 93pub struct TargetData {
94 pub package: Package, 94 pub package: Package,
95 pub name: String, 95 pub name: String,
diff --git a/crates/ra_project_model/src/lib.rs b/crates/ra_project_model/src/lib.rs
index 5d1f871c4..b9c5424bf 100644
--- a/crates/ra_project_model/src/lib.rs
+++ b/crates/ra_project_model/src/lib.rs
@@ -24,7 +24,7 @@ pub use crate::{
24}; 24};
25pub use ra_proc_macro::ProcMacroClient; 25pub use ra_proc_macro::ProcMacroClient;
26 26
27#[derive(Debug, Clone)] 27#[derive(Debug, Clone, Eq, PartialEq)]
28pub enum ProjectWorkspace { 28pub enum ProjectWorkspace {
29 /// Project workspace was discovered by running `cargo metadata` and `rustc --print sysroot`. 29 /// Project workspace was discovered by running `cargo metadata` and `rustc --print sysroot`.
30 Cargo { cargo: CargoWorkspace, sysroot: Sysroot }, 30 Cargo { cargo: CargoWorkspace, sysroot: Sysroot },
diff --git a/crates/ra_project_model/src/sysroot.rs b/crates/ra_project_model/src/sysroot.rs
index fc1673ede..68d134da4 100644
--- a/crates/ra_project_model/src/sysroot.rs
+++ b/crates/ra_project_model/src/sysroot.rs
@@ -3,19 +3,19 @@
3use std::{convert::TryFrom, env, ops, path::Path, process::Command}; 3use std::{convert::TryFrom, env, ops, path::Path, process::Command};
4 4
5use anyhow::{bail, format_err, Result}; 5use anyhow::{bail, format_err, Result};
6use paths::{AbsPath, AbsPathBuf};
6use ra_arena::{Arena, Idx}; 7use ra_arena::{Arena, Idx};
7 8
8use crate::output; 9use crate::output;
9use paths::{AbsPath, AbsPathBuf};
10 10
11#[derive(Default, Debug, Clone)] 11#[derive(Default, Debug, Clone, Eq, PartialEq)]
12pub struct Sysroot { 12pub struct Sysroot {
13 crates: Arena<SysrootCrateData>, 13 crates: Arena<SysrootCrateData>,
14} 14}
15 15
16pub type SysrootCrate = Idx<SysrootCrateData>; 16pub type SysrootCrate = Idx<SysrootCrateData>;
17 17
18#[derive(Debug, Clone)] 18#[derive(Debug, Clone, Eq, PartialEq)]
19pub struct SysrootCrateData { 19pub struct SysrootCrateData {
20 pub name: String, 20 pub name: String,
21 pub root: AbsPathBuf, 21 pub root: AbsPathBuf,