From e91eb2f55d007ba28ef44f36941616901d7f050b Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 26 May 2016 22:19:29 +0200 Subject: [PATCH] Use error.into() instead of building full type --- libimagstore/src/storeid.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libimagstore/src/storeid.rs b/libimagstore/src/storeid.rs index 140797f9..147b80cb 100644 --- a/libimagstore/src/storeid.rs +++ b/libimagstore/src/storeid.rs @@ -8,7 +8,7 @@ use std::fmt::{Debug, Formatter}; use std::fmt::Error as FmtError; use std::result::Result as RResult; -use error::{StoreError as SE, StoreErrorKind as SEK}; +use error::StoreErrorKind as SEK; use store::Result; use store::Store; @@ -88,7 +88,7 @@ pub fn build_entry_path(store: &Store, path_elem: &str) -> Result { if path_elem.split('~').last().map_or(false, |v| Version::parse(v).is_err()) { debug!("Version cannot be parsed from {:?}", path_elem); debug!("Path does not contain version!"); - return Err(SE::new(SEK::StorePathLacksVersion, None)); + return Err(SEK::StorePathLacksVersion.into()); } debug!("Version checking succeeded");