aboutsummaryrefslogtreecommitdiffstats
path: root/src/trial.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/trial.rs')
-rw-r--r--src/trial.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/trial.rs b/src/trial.rs
index 2b535a7..38c8a82 100644
--- a/src/trial.rs
+++ b/src/trial.rs
@@ -31,7 +31,7 @@ fn do_trial() {
::std::process::exit(exitcode::IOERR);
},
},
- DurationError => return trial_expired(),
+ ErrorKind::Duration(_) => return trial_expired(),
e => {
eprintln!("{}", e);
::std::process::exit(exitcode::SOFTWARE);
@@ -45,8 +45,11 @@ fn do_trial() {
match days_remaining_from_now(date) {
Ok(remaining) => print_trial_days(remaining),
- DurationError => trial_expired(),
- Err(e) => (),
+ Err(e) => {
+ match e {
+ DurationError::NegativeDuration(_) => trial_expired(),
+ }
+ },
}
}