diff --git a/bin/core/imag-store/src/create.rs b/bin/core/imag-store/src/create.rs index c6830a42..8b6cc2e2 100644 --- a/bin/core/imag-store/src/create.rs +++ b/bin/core/imag-store/src/create.rs @@ -44,8 +44,7 @@ pub fn create(rt: &Runtime) { // unwrap is safe as value is required let path = scmd.value_of("path").unwrap(); let path = PathBuf::from(path); - let store = Some(rt.store().path().clone()); - let path = StoreId::new(store, path).map_err_trace_exit_unwrap(); + let path = StoreId::new(path).map_err_trace_exit_unwrap(); debug!("path = {:?}", path); diff --git a/bin/core/imag-store/src/delete.rs b/bin/core/imag-store/src/delete.rs index bc1672b4..50c73d97 100644 --- a/bin/core/imag-store/src/delete.rs +++ b/bin/core/imag-store/src/delete.rs @@ -28,8 +28,7 @@ pub fn delete(rt: &Runtime) { let scmd = rt.cli().subcommand_matches("delete").unwrap(); let id = scmd.value_of("id").unwrap(); // safe by clap let path = PathBuf::from(id); - let store = Some(rt.store().path().clone()); - let path = StoreId::new(store, path).map_err_trace_exit_unwrap(); + let path = StoreId::new(path).map_err_trace_exit_unwrap(); debug!("Deleting file at {:?}", id); let _ = rt.store() diff --git a/bin/core/imag-store/src/get.rs b/bin/core/imag-store/src/get.rs index 582e67d7..bf9a1eea 100644 --- a/bin/core/imag-store/src/get.rs +++ b/bin/core/imag-store/src/get.rs @@ -31,8 +31,7 @@ pub fn get(rt: &Runtime) { let id = scmd.value_of("id").unwrap(); // safe by clap let path = PathBuf::from(id); - let store = Some(rt.store().path().clone()); - let path = StoreId::new(store, path).map_err_trace_exit_unwrap(); + let path = StoreId::new(path).map_err_trace_exit_unwrap(); debug!("path = {:?}", path); let _ = match rt.store().get(path.clone()).map_err_trace_exit_unwrap() { diff --git a/bin/core/imag-store/src/retrieve.rs b/bin/core/imag-store/src/retrieve.rs index e1fafce8..b359a3c4 100644 --- a/bin/core/imag-store/src/retrieve.rs +++ b/bin/core/imag-store/src/retrieve.rs @@ -37,8 +37,7 @@ pub fn retrieve(rt: &Runtime) { // unwrap() is safe as arg is required let id = scmd.value_of("id").unwrap(); let path = PathBuf::from(id); - let store = Some(rt.store().path().clone()); - let path = StoreId::new(store, path).map_err_trace_exit_unwrap(); + let path = StoreId::new(path).map_err_trace_exit_unwrap(); debug!("path = {:?}", path); rt.store() diff --git a/bin/core/imag-store/src/update.rs b/bin/core/imag-store/src/update.rs index cad2fd57..c2687973 100644 --- a/bin/core/imag-store/src/update.rs +++ b/bin/core/imag-store/src/update.rs @@ -31,8 +31,7 @@ pub fn update(rt: &Runtime) { let scmd = rt.cli().subcommand_matches("update").unwrap(); let id = scmd.value_of("id").unwrap(); // Safe by clap let path = PathBuf::from(id); - let store = Some(rt.store().path().clone()); - let path = StoreId::new(store, path).map_err_trace_exit_unwrap(); + let path = StoreId::new(path).map_err_trace_exit_unwrap(); let _ = rt.store() .retrieve(path)