summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2019-08-27 10:41:35 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-08-28 18:18:40 +0200
commit4d11ad2ac130c2c94d620392a26579d98c9f6880 (patch)
tree4eea6b0f0d7decece99c402465d03ac01b37a4cb
parentb8e9c17dc8a8c70f6b8ca555d14079895e191296 (diff)
[Auto] bin/core/store: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--bin/core/imag-store/src/create.rs4
-rw-r--r--bin/core/imag-store/src/delete.rs2
-rw-r--r--bin/core/imag-store/src/get.rs4
-rw-r--r--bin/core/imag-store/src/retrieve.rs8
-rw-r--r--bin/core/imag-store/src/update.rs2
-rw-r--r--bin/core/imag-store/src/util.rs2
-rw-r--r--bin/core/imag-store/src/verify.rs2
7 files changed, 12 insertions, 12 deletions
diff --git a/bin/core/imag-store/src/create.rs b/bin/core/imag-store/src/create.rs
index dcb5c686..0384310f 100644
--- a/bin/core/imag-store/src/create.rs
+++ b/bin/core/imag-store/src/create.rs
@@ -63,7 +63,7 @@ pub fn create(rt: &Runtime) {
}
.map_err_trace_exit_unwrap();
- let _ = rt.report_touched(&path).unwrap_or_exit();
+ rt.report_touched(&path).unwrap_or_exit();
}
fn create_from_cli_spec(rt: &Runtime, matches: &ArgMatches, path: &StoreId) -> Result<()> {
@@ -84,7 +84,7 @@ fn create_from_cli_spec(rt: &Runtime, matches: &ArgMatches, path: &StoreId) -> R
debug!("Got content with len = {}", content.len());
let header = matches.subcommand_matches("entry")
- .map_or_else(|| Entry::default_header(),
+ .map_or_else(Entry::default_header,
|entry_matches| build_toml_header(entry_matches, Entry::default_header()));
create_with_content_and_header(rt, path, content, header)
diff --git a/bin/core/imag-store/src/delete.rs b/bin/core/imag-store/src/delete.rs
index c3a9a052..b6189414 100644
--- a/bin/core/imag-store/src/delete.rs
+++ b/bin/core/imag-store/src/delete.rs
@@ -31,7 +31,7 @@ pub fn delete(rt: &Runtime) {
let path = StoreId::new(path).map_err_trace_exit_unwrap();
debug!("Deleting file at {:?}", id);
- let _ = rt.store()
+ rt.store()
.delete(path)
.map_warn_err(|e| format!("Error: {:?}", e))
.map_err_trace_exit_unwrap();
diff --git a/bin/core/imag-store/src/get.rs b/bin/core/imag-store/src/get.rs
index 6885f594..21115398 100644
--- a/bin/core/imag-store/src/get.rs
+++ b/bin/core/imag-store/src/get.rs
@@ -34,10 +34,10 @@ pub fn get(rt: &Runtime) {
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() {
+ match rt.store().get(path.clone()).map_err_trace_exit_unwrap() {
Some(entry) => {
print_entry(rt, scmd, entry);
- let _ = rt.report_touched(&path).unwrap_or_exit();
+ rt.report_touched(&path).unwrap_or_exit();
},
None => info!("No entry found"),
};
diff --git a/bin/core/imag-store/src/retrieve.rs b/bin/core/imag-store/src/retrieve.rs
index b359a3c4..06a0612f 100644
--- a/bin/core/imag-store/src/retrieve.rs
+++ b/bin/core/imag-store/src/retrieve.rs
@@ -47,14 +47,14 @@ pub fn retrieve(rt: &Runtime) {
.map_dbg(|e| format!("{:?}", e))
.map_err_trace_exit_unwrap();
- let _ = rt.report_touched(&path).unwrap_or_exit();
+ rt.report_touched(&path).unwrap_or_exit();
});
}
pub fn print_entry(rt: &Runtime, scmd: &ArgMatches, e: FileLockEntry) {
if do_print_raw(scmd) {
debug!("Printing raw content...");
- let _ = writeln!(rt.stdout(), "{}", e.to_str().map_err_trace_exit_unwrap())
+ writeln!(rt.stdout(), "{}", e.to_str().map_err_trace_exit_unwrap())
.to_exit_code()
.unwrap_or_exit();
} else if do_filter(scmd) {
@@ -73,7 +73,7 @@ pub fn print_entry(rt: &Runtime, scmd: &ArgMatches, e: FileLockEntry) {
unimplemented!()
} else {
debug!("Printing header as TOML...");
- let _ = writeln!(rt.stdout(), "{}", e.get_header())
+ writeln!(rt.stdout(), "{}", e.get_header())
.to_exit_code()
.unwrap_or_exit();
}
@@ -81,7 +81,7 @@ pub fn print_entry(rt: &Runtime, scmd: &ArgMatches, e: FileLockEntry) {
if do_print_content(scmd) {
debug!("Printing content...");
- let _ = writeln!(rt.stdout(), "{}", e.get_content())
+ writeln!(rt.stdout(), "{}", e.get_content())
.to_exit_code()
.unwrap_or_exit();
}
diff --git a/bin/core/imag-store/src/update.rs b/bin/core/imag-store/src/update.rs
index 4ce5ac44..595b7b13 100644
--- a/bin/core/imag-store/src/update.rs
+++ b/bin/core/imag-store/src/update.rs
@@ -49,7 +49,7 @@ pub fn update(rt: &Runtime) {
debug!("New header set");
}
- let _ = rt.report_touched(locked_e.get_location()).unwrap_or_exit();
+ rt.report_touched(locked_e.get_location()).unwrap_or_exit();
});
}
diff --git a/bin/core/imag-store/src/util.rs b/bin/core/imag-store/src/util.rs
index 62f19120..c1dcc8d3 100644
--- a/bin/core/imag-store/src/util.rs
+++ b/bin/core/imag-store/src/util.rs
@@ -29,7 +29,7 @@ use libimagutil::key_value_split::IntoKeyValue;
pub fn build_toml_header(matches: &ArgMatches, mut header: Value) -> Value {
debug!("Building header from cli spec");
if let Some(headerspecs) = matches.values_of("header") {
- let kvs = headerspecs.into_iter()
+ let kvs = headerspecs
.filter_map(|hs| {
debug!("- Processing: '{}'", hs);
let kv = String::from(hs).into_kv();
diff --git a/bin/core/imag-store/src/verify.rs b/bin/core/imag-store/src/verify.rs
index c63b7c41..a43ad908 100644
--- a/bin/core/imag-store/src/verify.rs
+++ b/bin/core/imag-store/src/verify.rs
@@ -48,7 +48,7 @@ pub fn verify(rt: &Runtime) {
};
info!("{: >6} | {: >14} | {:?}", verify, content_len, p.deref());
- let _ = rt.report_touched(fle.get_location()).unwrap_or_exit();
+ rt.report_touched(fle.get_location()).unwrap_or_exit();
status
});