diff options
Diffstat (limited to 'crates/ra_project_model/src')
-rw-r--r-- | crates/ra_project_model/src/cargo_workspace.rs | 4 |
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 | ||
3 | use std::path::{Path, PathBuf}; | 3 | use std::path::{Path, PathBuf}; |
4 | use std::str::FromStr; | ||
5 | 4 | ||
6 | use cargo_metadata::{CargoOpt, MetadataCommand}; | 5 | use cargo_metadata::{CargoOpt, MetadataCommand}; |
7 | use ra_arena::{impl_arena_id, Arena, RawId}; | 6 | use 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, |