diff options
Diffstat (limited to 'crates/server/src/project_model.rs')
-rw-r--r-- | crates/server/src/project_model.rs | 4 |
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 | ||
58 | impl Target { | 58 | impl 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() |