1
0
Fork 0
mirror of https://github.com/icewind1991/zox synced 2026-06-03 18:34:07 +02:00

optimize help a bit

This commit is contained in:
Robin Appelman 2019-12-12 01:13:32 +01:00
commit a59f4db38e

View file

@ -83,6 +83,11 @@ fn now() -> u64 {
fn main() -> Result<(), MainError> {
let args = Args::from_env();
if args.help {
println!("zox [-h][-l][-r][-t] args");
return Ok(());
}
let home = home::home_dir().expect("Cant get home directory");
let history_path = home.join(".z");
@ -94,11 +99,6 @@ fn main() -> Result<(), MainError> {
let now = now();
if args.help {
println!("zox [-h][-l][-r][-t] args");
return Ok(());
}
let history = reader
.deserialize::<History>()
.filter_map(|result| result.ok());