From 0861ac061ef5c8b5d7ed2a95ef30f4a17710229d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 22 Nov 2019 14:08:18 +0300 Subject: Cleanup errors --- crates/ra_project_model/src/cargo_workspace.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'crates/ra_project_model') 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 @@ //! FIXME: write short doc here use std::path::{Path, PathBuf}; -use std::str::FromStr; use cargo_metadata::{CargoOpt, MetadataCommand}; use ra_arena::{impl_arena_id, Arena, RawId}; @@ -143,8 +142,7 @@ impl CargoWorkspace { for meta_pkg in meta.packages { let cargo_metadata::Package { id, edition, name, manifest_path, .. } = meta_pkg; let is_member = ws_members.contains(&id); - let edition = Edition::from_str(&edition) - .map_err(|e| (format!("metadata for package {} failed: {}", &name, e.msg)))?; + let edition = edition.parse::()?; let pkg = packages.alloc(PackageData { name, manifest: manifest_path, -- cgit v1.2.3