aboutsummaryrefslogtreecommitdiff
path: root/crates/server/src/project_model.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-09-02 14:36:03 +0100
committerAleksey Kladov <[email protected]>2018-09-02 14:36:03 +0100
commite98d8cd255ab5c2fee873a58af6c2c3ad561dab4 (patch)
tree04869b8fe93e724d8aa266177e48644051331ab9 /crates/server/src/project_model.rs
parent1329dd4e287c137ec0a90abeec0272275b2b2c8d (diff)
nail down runnables
Diffstat (limited to 'crates/server/src/project_model.rs')
-rw-r--r--crates/server/src/project_model.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/server/src/project_model.rs b/crates/server/src/project_model.rs
index 1c5954dad..12233f258 100644
--- a/crates/server/src/project_model.rs
+++ b/crates/server/src/project_model.rs
@@ -56,7 +56,7 @@ impl Package {
56} 56}
57 57
58impl Target { 58impl Target {
59 pub fn pkg(self, ws: &CargoWorkspace) -> Package { 59 pub fn package(self, ws: &CargoWorkspace) -> Package {
60 ws.tgt(self).pkg 60 ws.tgt(self).pkg
61 } 61 }
62 pub fn name(self, ws: &CargoWorkspace) -> &str { 62 pub fn name(self, ws: &CargoWorkspace) -> &str {
@@ -114,7 +114,7 @@ impl CargoWorkspace {
114 pub fn ws_members<'a>(&'a self) -> impl Iterator<Item=Package> + 'a { 114 pub fn ws_members<'a>(&'a self) -> impl Iterator<Item=Package> + 'a {
115 self.ws_members.iter().cloned() 115 self.ws_members.iter().cloned()
116 } 116 }
117 pub fn target_by_roo(&self, root: &Path) -> Option<Target> { 117 pub fn target_by_root(&self, root: &Path) -> Option<Target> {
118 self.packages() 118 self.packages()
119 .filter_map(|pkg| pkg.targets(self).find(|it| it.root(self) == root)) 119 .filter_map(|pkg| pkg.targets(self).find(|it| it.root(self) == root))
120 .next() 120 .next()