Impl IntoStoreId for StoreId

This commit is contained in:
Matthias Beyer 2016-05-03 15:45:06 +02:00
parent 7e17e213be
commit 24ddf5d53b
1 changed files with 6 additions and 0 deletions

View File

@ -78,6 +78,12 @@ impl IntoStoreId for PathBuf {
}
}
impl IntoStoreId for StoreId {
fn into_storeid(self) -> StoreId {
self
}
}
pub fn build_entry_path(store: &Store, path_elem: &str) -> Result<PathBuf> {
debug!("Checking path element for version");
if path_elem.split("~").last().map(|v| Version::parse(v).is_err()).unwrap_or(false) {