Use error.into() instead of building full type
This commit is contained in:
parent
5e98bd76b1
commit
e91eb2f55d
1 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ use std::fmt::{Debug, Formatter};
|
||||||
use std::fmt::Error as FmtError;
|
use std::fmt::Error as FmtError;
|
||||||
use std::result::Result as RResult;
|
use std::result::Result as RResult;
|
||||||
|
|
||||||
use error::{StoreError as SE, StoreErrorKind as SEK};
|
use error::StoreErrorKind as SEK;
|
||||||
use store::Result;
|
use store::Result;
|
||||||
use store::Store;
|
use store::Store;
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ pub fn build_entry_path(store: &Store, path_elem: &str) -> Result<PathBuf> {
|
||||||
if path_elem.split('~').last().map_or(false, |v| Version::parse(v).is_err()) {
|
if path_elem.split('~').last().map_or(false, |v| Version::parse(v).is_err()) {
|
||||||
debug!("Version cannot be parsed from {:?}", path_elem);
|
debug!("Version cannot be parsed from {:?}", path_elem);
|
||||||
debug!("Path does not contain version!");
|
debug!("Path does not contain version!");
|
||||||
return Err(SE::new(SEK::StorePathLacksVersion, None));
|
return Err(SEK::StorePathLacksVersion.into());
|
||||||
}
|
}
|
||||||
debug!("Version checking succeeded");
|
debug!("Version checking succeeded");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue