diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-22 11:13:24 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-22 11:13:24 +0000 |
commit | a132cc715ed05cab83fd058156eb152f0be96982 (patch) | |
tree | ce2e04a611618bdd47bd81b6f15fcdf324308913 /crates/ra_project_model | |
parent | c866efdf36139502ec824bc38892fb2bda14484f (diff) | |
parent | f4b1fb1554b639374adeffa50d4719f834a0d475 (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.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, |