From 364ad01179dfe233708403ec3b0d674862309163 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 5 Sep 2016 18:22:55 +0200 Subject: [PATCH] Use StoreId::from_full_path() in GlobStoreIdIterator::next() --- libimagstore/src/store.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index b1709574..5ebd9953 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -1522,11 +1522,7 @@ mod glob_store_iter { .and_then(|o| { debug!("GlobStoreIdIterator::next() => {:?}", o); o.map_err_into(SEK::StoreIdHandlingError) - .and_then(|p| { - let p = try!(p.strip_prefix(&self.store_path) - .map_err_into(SEK::StoreIdHandlingError)); - StoreId::new(Some(self.store_path.clone()), PathBuf::from(p)) - }) + .and_then(|p| StoreId::from_full_path(&self.store_path, p)) .map_err(|e| { debug!("GlobStoreIdIterator error: {:?}", e); trace_error(&e);