summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-02-11 22:20:05 +0100
committerMatthias Beyer <mail@beyermatthias.de>2019-02-15 20:53:29 +0100
commit5fe139e02ba26f5d0026797b3a028642c2ee1fa9 (patch)
treeb994769e532e61118714e851afa9dd76c578de56
parent39d638daee34c8e7b78cfb48c9f2781872a6b45e (diff)
downloadimag-5fe139e02ba26f5d0026797b3a028642c2ee1fa9.zip
imag-5fe139e02ba26f5d0026797b3a028642c2ee1fa9.tar.gz
Adapt StoreId::new() calls
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--bin/core/imag-store/src/create.rs3
-rw-r--r--bin/core/imag-store/src/delete.rs3
-rw-r--r--bin/core/imag-store/src/get.rs3
-rw-r--r--bin/core/imag-store/src/retrieve.rs3
-rw-r--r--bin/core/imag-store/src/update.rs3
5 files changed, 5 insertions, 10 deletions
diff --git a/bin/core/imag-store/src/create.rs b/bin/core/imag-store/src/create.rs
index c6830a4..8b6cc2e 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 bc1672b..50c73d9 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 582e67d..bf9a1ee 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 e1fafce..b359a3c 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 cad2fd5..c268797 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)