aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_project_model
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-22 11:08:18 +0000
committerAleksey Kladov <[email protected]>2019-11-22 11:08:18 +0000
commit0861ac061ef5c8b5d7ed2a95ef30f4a17710229d (patch)
treef6422fb3ac2d657500767b4fe6283e00e80e0631 /crates/ra_project_model
parent2c48fa087b6cc79ebfd81af9daf4a07d8019fd67 (diff)
Cleanup errors
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,