Use unused results
This commit is contained in:
parent
3f2114bf1f
commit
75fbcef4aa
1 changed files with 5 additions and 4 deletions
|
@ -32,7 +32,7 @@ pub fn create(rt: &Runtime) {
|
|||
let path = scmd.value_of("path").or_else(|| scmd.value_of("id"));
|
||||
if path.is_none() {
|
||||
warn!("No ID / Path provided. Exiting now");
|
||||
write!(stderr(), "No ID / Path provided. Exiting now");
|
||||
write!(stderr(), "No ID / Path provided. Exiting now").ok();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -101,14 +101,15 @@ fn create_from_source(rt: &Runtime, matches: &ArgMatches, path: &PathBuf) -> Res
|
|||
debug!("Content with len = {}", content.len());
|
||||
|
||||
Entry::from_str(path.clone(), &content[..])
|
||||
.map(|mut new_e| {
|
||||
rt.store()
|
||||
.and_then(|new_e| {
|
||||
let r = rt.store()
|
||||
.create(path.clone())
|
||||
.map(|mut old_e| {
|
||||
*old_e.deref_mut() = new_e;
|
||||
});
|
||||
|
||||
debug!("Entry build");
|
||||
r
|
||||
})
|
||||
.map_err(|serr| StoreError::new(StoreErrorKind::BackendError, Some(Box::new(serr))))
|
||||
}
|
||||
|
@ -144,7 +145,7 @@ fn string_from_raw_src(raw_src: &str) -> String {
|
|||
debug!("Read {:?} bytes", res);
|
||||
} else {
|
||||
debug!("Reading entry from file at {:?}", raw_src);
|
||||
OpenOptions::new()
|
||||
let _ = OpenOptions::new()
|
||||
.read(true)
|
||||
.write(false)
|
||||
.create(false)
|
||||
|
|
Loading…
Reference in a new issue