refactor: simplify one match expression

Signed-off-by: ljedrz <ljedrz@gmail.com>
This commit is contained in:
ljedrz 2020-06-26 14:44:40 +02:00
parent 8a942adf3e
commit 8c89714da9

View File

@ -51,13 +51,10 @@ fn main() {
// FIXME: need to process cmdline args here, but trying to understand js-ipfsd-ctl right now a
// bit more.
let home = match home {
Some(path) => path,
None => {
eprintln!("IPFS_PATH and HOME unset");
std::process::exit(1);
}
};
let home = home.unwrap_or_else(|| {
eprintln!("IPFS_PATH and HOME unset");
std::process::exit(1);
});
let config_path = home.join("config");