update crates

This commit is contained in:
2020-03-29 00:16:11 +08:00
parent 209aa3ba6b
commit 7da74889d3
2 changed files with 448 additions and 458 deletions

900
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -13,6 +13,7 @@ use std::{
use rust_util::{ use rust_util::{
XResult, XResult,
util_msg::*, util_msg::*,
iff,
}; };
use oss_util::*; use oss_util::*;
use config_util::*; use config_util::*;
@@ -26,8 +27,7 @@ use opt::{
fn main() -> XResult<()> { fn main() -> XResult<()> {
let options = Options::new_and_parse_args()?; let options = Options::new_and_parse_args()?;
if options.version { if options.version {
// TODO ... print_message(MessageType::INFO, "ossbackupd v0.1");
print_message(MessageType::INFO, "VERSION!!!");
return Ok(()); return Ok(());
} }
@@ -48,7 +48,7 @@ fn main() -> XResult<()> {
// let openpgp_client = OpenPGPTool::from_file("sample.gpg")?; // let openpgp_client = OpenPGPTool::from_file("sample.gpg")?;
// openpgp_client.encrypt_file("a", "b.asc", true)?; // openpgp_client.encrypt_file("a", "b.asc", true)?;
let config_json = match get_config_json(if options.config == "" { None } else { Some(&options.config) }, options.verbose) { let config_json = match get_config_json(iff!(options.config.is_empty(), None, Some(&options.config)), options.verbose) {
None => return Ok(()), None => return Ok(()),
Some(c) => c, Some(c) => c,
}; };