aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_project_model
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-22 11:13:24 +0000
committerGitHub <[email protected]>2019-11-22 11:13:24 +0000
commita132cc715ed05cab83fd058156eb152f0be96982 (patch)
treece2e04a611618bdd47bd81b6f15fcdf324308913 /crates/ra_project_model
parentc866efdf36139502ec824bc38892fb2bda14484f (diff)
parentf4b1fb1554b639374adeffa50d4719f834a0d475 (diff)
Merge #2354
2354: Cleanup errors r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_project_model')
-rw-r--r--crates/ra_project_model/src/cargo_workspace.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs
index cf88911b7..c128e608d 100644
--- a/crates/ra_project_model/src/cargo_workspace.rs
+++ b/crates/ra_project_model/src/cargo_workspace.rs
@@ -1,7 +1,6 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use std::path::{Path, PathBuf}; 3use std::path::{Path, PathBuf};
4use std::str::FromStr;
5 4
6use cargo_metadata::{CargoOpt, MetadataCommand}; 5use cargo_metadata::{CargoOpt, MetadataCommand};
7use ra_arena::{impl_arena_id, Arena, RawId}; 6use ra_arena::{impl_arena_id, Arena, RawId};
@@ -143,8 +142,7 @@ impl CargoWorkspace {
143 for meta_pkg in meta.packages { 142 for meta_pkg in meta.packages {
144 let cargo_metadata::Package { id, edition, name, manifest_path, .. } = meta_pkg; 143 let cargo_metadata::Package { id, edition, name, manifest_path, .. } = meta_pkg;
145 let is_member = ws_members.contains(&id); 144 let is_member = ws_members.contains(&id);
146 let edition = Edition::from_str(&edition) 145 let edition = edition.parse::<Edition>()?;
147 .map_err(|e| (format!("metadata for package {} failed: {}", &name, e.msg)))?;
148 let pkg = packages.alloc(PackageData { 146 let pkg = packages.alloc(PackageData {
149 name, 147 name,
150 manifest: manifest_path, 148 manifest: manifest_path,